Table Filters
import {
TableColumnFilterAction,
TableFilterBar,
} from "@qualcomm-ui/react/table-filters"Both components read the filter set from a surrounding FilterSetProvider or filter panel. See Column Header Filters for an example.
API
TableColumnFilterAction
Type
booleanType
Header<any>
Description
The column header associated with the filter.
Type
| LucideIcon
| ReactElement
Description
Lucide icon to display inside the button.
Type
booleanType
| ReactElement
| ((
props: object,
) => ReactElement)
Description
Allows you to replace the component's HTML element with a different tag or component. Learn more
TableFilterBar
The simple TableFilterBar renders the root, filter list, expand trigger, and clear trigger. It accepts the root's props and these props for its parts.
Type
TableFilterBarClearTriggerPropsDescription
Props applied to the clear trigger component.
Type
TableFilterBarExpandTriggerPropsDescription
Props applied to the expand trigger component.
Type
Omit<
TableFilterBarFilterListProps,
'children'
>
Description
Props applied to the filter list component.
TableFilterBar.Root
The root element of the filter bar. Must be rendered within a
Table.Root
and a filter set, such as a FilterSetProvider. Renders nothing while no
filters are applied. Otherwise renders a <div> element by default.Type
booleanDescription
The initial expanded state. Use when you don't need to control the
expanded state.
Type
booleanDescription
The controlled expanded state. When
false, the applied filters are
clamped to a single row.Type
(
expanded: boolean,
) => void
Description
Called when the expanded state changes.
Type
| ReactElement
| ((
props: object,
) => ReactElement)
Description
Allows you to replace the component's HTML element with a different tag or component. Learn more
TableFilterBar.FilterList
Lists the applied filters as dismissable tags, followed by its children.
Clamped to a single row unless the filter bar is expanded. Renders a
<div>
element by default.Type
| ReactElement
| ((
props: object,
) => ReactElement)
Description
Allows you to replace the component's HTML element with a different tag or component. Learn more
TableFilterBar.ExpandTrigger
Shows or hides the applied filters that don't fit on one row. Render it
within the
TableFilterBar.FilterList so that it follows the last visible
filter. Hidden while every applied filter fits. Renders a <button> element
by default.v1.32.0
Type
Description
A
NumberBadge or StatusBadge, positioned after the text content. Its
emphasis, size, and disabled state default to values that match the button.
Props set on the badge take precedence.Type
| string
| number
| bigint
| ReactElement
| Iterable<ReactNode>
| ReactPortal
| Promise<AwaitedReactNode>
| ((props: {
expanded: boolean
hiddenCount: number
}) => ReactNode)
| boolean
| null
| undefined
Description
The trigger's content. Pass a function to render different content for
each state.
hiddenCount is the number of applied filters hidden while
collapsed.Type
| 'default'
| 'compact'
Description
The density of the button. Governs padding and height.
Type
booleanDescription
Controls whether the component is interactive. When
true, pointer/focus
events are blocked, and the component is visually dimmed.Type
| 'neutral'
| 'primary'
| 'danger'
| 'persistent-white'
| 'persistent-black'
| 'inverse'
| 'white-persistent'
| 'black-persistent'
Description
The style variant of the button. Governs colors.
Type
| LucideIcon
| ReactElement
| null
Description
Icon positioned after the text content. If supplied as a
LucideIcon, the size will automatically match the size prop.
Supply as a ReactElement for additional customization.Type
| ReactElement
| ((
props: object,
) => ReactElement)
Description
Allows you to replace the component's HTML element with a different tag or component. Learn more
Type
| 'sm'
| 'md'
| 'lg'
Description
The size of the component and its icons.
Type
| LucideIcon
| ReactElement
| null
Description
Icon positioned before the text content. If supplied as a
LucideIcon,
the size will automatically match the size prop. Supply as a
ReactElement for additional customization.Type
| 'fill'
| 'ghost'
| 'outline'
Description
The style variant of the button. Governs colors.
TableFilterBar.ClearTrigger
Removes every applied filter when clicked. Renders a
<button> element by
default.v1.32.0
Type
Description
A
NumberBadge or StatusBadge, positioned after the text content. Its
emphasis, size, and disabled state default to values that match the button.
Props set on the badge take precedence.Type
| 'default'
| 'compact'
Description
The density of the button. Governs padding and height.
Type
booleanDescription
Controls whether the component is interactive. When
true, pointer/focus
events are blocked, and the component is visually dimmed.Type
| 'neutral'
| 'primary'
| 'danger'
| 'persistent-white'
| 'persistent-black'
| 'inverse'
| 'white-persistent'
| 'black-persistent'
Description
The style variant of the button. Governs colors.
Type
| LucideIcon
| ReactElement
| null
Description
Icon positioned after the text content. If supplied as a
LucideIcon, the size will automatically match the size prop.
Supply as a ReactElement for additional customization.Type
| ReactElement
| ((
props: object,
) => ReactElement)
Description
Allows you to replace the component's HTML element with a different tag or component. Learn more
Type
| 'sm'
| 'md'
| 'lg'
Description
The size of the component and its icons.
Type
| LucideIcon
| ReactElement
| null
Description
Icon positioned before the text content. If supplied as a
LucideIcon,
the size will automatically match the size prop. Supply as a
ReactElement for additional customization.Type
| 'fill'
| 'ghost'
| 'outline'
Description
The style variant of the button. Governs colors.
Updated by Ryan Bower
Popovertrigger in a column header. Shows a filled icon while the column is filtered. Renders nothing when the column can't be filtered. Otherwise renders a<button>element by default.