--- title: "Query Filter" slug: query-filter category: component type: technical-information version: 20.0.0 tokens: 1072 source: https://ovh.github.io/design-system/v20.0.0/llms/react-components-query-filter--technical-information.txt --- # Query Filter ## QueryFilter | Property | Type | Required | Default | Description | |---|---|---|---|---| | `allowCustomValue` | `boolean` | No | undefined | Whether to allow adding a custom filter. | | `defaultOpen` | `boolean` | No | undefined | The initial open state of the query filter. Use when you don't need to control the open state of the query filter. | | `defaultValue` | `string[][]` | No | undefined | The initial selected value(s). Use when you don't need to control the selected value(s) of the query filter. | | `disabled` | `boolean` | No | undefined | Whether the component is disabled. | | `filterOption` | `QueryFilterOption` | Yes | undefined | The property filter options (operator and value). | | `filterProperty` | `QueryFilterGroup` | Yes | undefined | The properties that may be used as a filter. | | `highlightResults` | `boolean` | No | undefined | Whether to highlight the matching part of filtered items. | | `i18n` | `Partial` | No | undefined | Internal translations override (see Input i18n keys). | | `invalid` | `boolean` | No | undefined | Whether the component is in error state. | | `locale` | `'fr' | 'de' | 'en' | 'es' | 'it' | 'nl' | 'pl' | 'pt'` | No | undefined | The locale used for the translation of the internal elements. | | `name` | `string` | No | undefined | The name of the form element. Useful for form submission. | | `newElementLabel` | `string` | No | undefined | Label displayed in front of a custom filter to add. | | `noResultLabel` | `string` | No | undefined | Label displayed when no values match the current input value. | | `onInputValueChange` | `(value: QueryFilterInputValueChangeDetails) => void` | No | undefined | Callback fired when the input value changes. | | `onOpenChange` | `(detail: QueryFilterOpenChangeDetail) => void` | No | undefined | Callback fired when the query filter open state changes. | | `onValueChange` | `(value: QueryFilterValueChangeDetails) => void` | No | undefined | Callback fired when the value(s) changes. | | `open` | `boolean` | No | undefined | The controlled open state of the query filter. | | `overlayConfig` | `object` | No | undefined | The overlay configuration. | | `readOnly` | `boolean` | No | undefined | Whether the component is readonly. | | `required` | `boolean` | No | undefined | Whether the component is required. | | `value` | `string[][]` | No | undefined | The controlled selected value(s). | ## QueryFilterClear | Property | Type | Required | Default | Description | |---|---|---|---|---| | `emphasis` | `BUTTON_EMPHASIS` | No | undefined | The emphasis preset to use, setting the visual weight of the button. | | `loading` | `boolean` | No | undefined | Whether the component is in loading state, disabling it. | | `size` | `'xs' | 'sm' | 'md'` | No | undefined | The size preset to use. | | `status` | `BUTTON_STATUS` | No | undefined | The status preset to use. | ## QueryFilterContent This component extends all the native `
` attributes. | Property | Type | Required | Default | Description | |---|---|---|---|---| | `createPortal` | `boolean` | No | undefined | Whether the component should be rendered in the DOM close to the body tag. | ## QueryFilterControl This component extends all the native `
` attributes. | Property | Type | Required | Default | Description | |---|---|---|---|---| | `clearable` | `boolean` | No | undefined | Whether the clear button is displayed. | | `loading` | `boolean` | No | undefined | Whether the component is in loading state. | | `placeholder` | `string` | No | undefined | The placeholder text to display in the input. | ## QueryFilterTags This component extends all the native `
    ` attributes. _No specific property._ ## CSS Variables | Variable | Default value | |---|---| | `--ods-query-filter-group-option-padding-horizontal` | `calc(var(--ods-semantic-size-space-inset-inline) * 3)` | | `--ods-query-filter-control-column-gap` | `calc(var(--ods-semantic-size-space-gap-inline) / 2)` | | `--ods-query-filter-control-row-gap` | `calc(var(--ods-semantic-size-space-gap-block) / 2)` | | `--ods-query-filter-control-padding-vertical` | `calc(var(--ods-semantic-size-space-inset-block-compact) / 2)` | | `--ods-state-is-disabled-opacity` | `var(--ods-semantic-opacity-disabled)` |