Skip to main content

Quick Filter

The quick filter is a single global search box that matches the term against every column at once — the fastest way to let users find a row. Turn it on with enableGlobalFilter:

<DataTable columns={columns} data={rows} enableGlobalFilter />

It appears in the toolbar as a search icon that expands into a field when clicked (auto-focuses, shows a clear button while it has text, and collapses again when emptied).

Loading demo…

Client vs server

filterMode decides where matching happens — it's shared with column filters:

filterModeBehaviour
'client' (default)The grid filters the in-memory data as the user types.
'server'The term is handed to onFetchData (as globalFilter) so your backend filters — see Server-side data.

Props & callbacks

PropTypeDefaultUse case
enableGlobalFilterbooleanfalseShow the quick-search control.
onGlobalFilterChange(value: string) => voidObserve the term (analytics, syncing a URL param).
localeText.searchPlaceholderstring'Search…'Change the field placeholder — see Localization.

Control it imperatively

Drive the search from your own UI through apiRef:

apiRef.current?.filtering.setGlobalFilter('acme');
apiRef.current?.filtering.clearGlobalFilter();
apiRef.current?.state.getGlobalFilter(); // read the current term

Quick filter vs column filters

Quick filterColumn filters
ScopeAll columns at onceOne rule per column (field · operator · value)
UIOne search boxRule-builder popover with an active-count badge
PropenableGlobalFilterenableColumnFilter

They're independent — enable one, the other, or both.