Skip to content

Filtering and search

The search box in the top toolbar looks at every column. Use enableGlobalFilter={false} to remove it, or enableGlobalFilter: false on a column to leave that column out. searchValue changes the text a column offers.

Set enableColumnFilters to show a filter under each header.

filterVariantFilterMatches
text (default)A text boxValues that contain the text, ignoring case
selectA selectValues equal to the chosen option
rangeMin and max boxesNumbers between the two
checkboxA three state checkboxtrue, false or any
falseNone

A select lists the distinct values of the column unless you pass filterOptions:

{
accessor: 'status',
header: 'Status',
filterVariant: 'select',
filterOptions: [{ label: 'Open', value: 'open' }, { label: 'Closed', value: 'closed' }],
}

Start with filters applied using initialState={{ columnFilters: { status: 'open' }, globalFilter: 'ann' }}.