diff --git a/packages/grafana-ui/src/components/Select/SelectBase.tsx b/packages/grafana-ui/src/components/Select/SelectBase.tsx index 8e6e0e4d9ce..7d655117845 100644 --- a/packages/grafana-ui/src/components/Select/SelectBase.tsx +++ b/packages/grafana-ui/src/components/Select/SelectBase.tsx @@ -98,6 +98,7 @@ export function SelectBase({ defaultOptions, defaultValue, disabled = false, + filterOption, formatCreateLabel, getOptionLabel, getOptionValue, @@ -176,6 +177,7 @@ export function SelectBase({ defaultValue, // Also passing disabled, as this is the new Select API, and I want to use this prop instead of react-select's one disabled, + filterOption, getOptionLabel, getOptionValue, inputValue, diff --git a/packages/grafana-ui/src/components/Select/types.ts b/packages/grafana-ui/src/components/Select/types.ts index 2acace47c8f..27caf8de145 100644 --- a/packages/grafana-ui/src/components/Select/types.ts +++ b/packages/grafana-ui/src/components/Select/types.ts @@ -14,6 +14,7 @@ export interface SelectCommonProps { components?: any; defaultValue?: any; disabled?: boolean; + filterOption?: (option: SelectableValue, searchQuery: string) => void; /** Function for formatting the text that is displayed when creating a new value*/ formatCreateLabel?: (input: string) => string; getOptionLabel?: (item: SelectableValue) => string;