AdvancedFilterBuilder
ProAdvancedFilterBuilder edits nested rule groups and emits both a filter tree and query string.
Where
Current Query
Use Apply Filter to commit the current rules.
Installation
Add this component with the NateUI CLI.
Examples
Custom Fields
Initial Value
Popover
Nested Groups
Query Helpers
Callback Events
API
AdvancedFilterBuilder stores rule edits internally unless a new value tree is
passed from the parent. All callbacks receive the current tree and the matching
query string.
| Prop | Description | Type | Default |
|---|---|---|---|
fields | Field list used to render the field dropdown, operator list, and value input for each rule. | FieldConfig[] | DEFAULT_FIELDS |
value | Filter tree used to initialize or replace the builder state. | FilterTree | - |
onChange | Called after a rule or group edit. | (tree: FilterTree, queryString: string) => void | - |
onApply | Called when the Apply Filter button is pressed. | (tree: FilterTree, queryString: string) => void | - |
onReset | Called after Reset restores a single empty rule. | (tree: FilterTree, queryString: string) => void | - |
Utilities
| Export | Description | Type |
|---|---|---|
toQueryString | Serializes a FilterTree to the query string form used by callbacks. | (tree: FilterTree) => string |
parseQueryString | Parses a query string into a FilterTree. Field type coercion currently follows the built-in default fields. | (query: string) => FilterTree |