Documentation
Quick Filter / Global Search
Quick Filter provides powerful global search functionality that searches across all columns with a single input. Choose between simple text matching or smart search mode with advanced operators for complex queries.
Basic Implementation
Enable quick filter by passing a quickFilter prop with a QuickFilterConfig object. The quick filter applies before column-specific filters in the filter chain.
Quick Filter Configuration
QuickFilterConfig Properties
QuickFilterConfig
Search Modes
Simple Mode
Simple mode performs basic text matching using a "contains" search. It's straightforward and intuitive for users who want to quickly find data without learning special syntax.
Example: Searching for engineering will match any row containing "engineering" in any searchable column.
Smart Mode
Smart mode provides advanced search capabilities with multiple operators for power users:
- Multi-word (AND logic):
alice engineering→ matches rows containing both "alice" AND "engineering" - Phrase search:
"alice johnson"→ matches exact phrase "alice johnson" - Negation:
-inactive→ excludes rows containing "inactive" - Column-specific search:
department:engineering→ searches only in the department column - Combine operators:
engineering -inactive location:new→ complex queries with multiple conditions
Column Configuration
Customize how individual columns behave in quick filter searches using these HeaderObject properties:
Column Configuration
QuickFilterGetterProps
The quickFilterGetter function receives these properties:
QuickFilterGetterProps
Programmatic Control
Control the quick filter programmatically using the tableRef.setQuickFilter() method. This is useful for implementing custom search UI, keyboard shortcuts, or integrating with external search components.
// Set quick filter text programmatically
tableRef.current?.setQuickFilter("engineering");
// Clear quick filter
tableRef.current?.setQuickFilter("");
// Keyboard shortcut example
useEffect(() => {
const handleKeyPress = (e: KeyboardEvent) => {
if (e.ctrlKey && e.key === 'f') {
e.preventDefault();
searchInputRef.current?.focus();
}
};
window.addEventListener('keydown', handleKeyPress);
return () => window.removeEventListener('keydown', handleKeyPress);
}, []);For more details, see the Programmatic Control documentation.