Filter Field
The control for one filter schema field, named by its label: an input for text, a select or checkboxes for options, a select for a boolean, a comparison and numbers, date pickers, or a ServerCombobox for remote options.
Example
Values {"priority":"high"}
filter-field-demo.tsxCopy code
Installation
Copy code
Usage
ImportCopy code
Use it to edit one schema field anywhere: the chips and the panel are built on it.
API reference
FilterField
| Prop | Type | Default |
|---|---|---|
fieldrequired | FilterFieldDefinition | – |
valuerequired | unknown | – |
onValueChangerequired | (value: unknown) => void | – |
labels | Partial<FilterFieldLabels> | – |
valueLabelsLabels of remote option values that haven't loaded, like ids from the URL. | Readonly<Record<string, string>> | – |
onSubmitEnter in a text or number input, to apply at once. | () => void | – |
onValueLabelsThe labels of remote options as they are chosen, for a summary that shows labels, not ids. | (labels: Readonly<Record<string, string>>) => void | – |
localeWrites dates and numbers in the pickers and inputs; the page's `<html lang>` by default (`useLocale`). | string | – |
className | string | – |
Other exports
appliesAtOncefilterFieldLabelstype FilterFieldLabelstype FilterFieldPropsAccessibility
- Every control is named by the field's label; groups of checkboxes and number pairs are labelled groups.
Agent actions
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.