mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Search: Add filterOption prop to Select (#24213)
This commit is contained in:
parent
8a88632791
commit
6768fb3672
@ -98,6 +98,7 @@ export function SelectBase<T>({
|
|||||||
defaultOptions,
|
defaultOptions,
|
||||||
defaultValue,
|
defaultValue,
|
||||||
disabled = false,
|
disabled = false,
|
||||||
|
filterOption,
|
||||||
formatCreateLabel,
|
formatCreateLabel,
|
||||||
getOptionLabel,
|
getOptionLabel,
|
||||||
getOptionValue,
|
getOptionValue,
|
||||||
@ -176,6 +177,7 @@ export function SelectBase<T>({
|
|||||||
defaultValue,
|
defaultValue,
|
||||||
// Also passing disabled, as this is the new Select API, and I want to use this prop instead of react-select's one
|
// Also passing disabled, as this is the new Select API, and I want to use this prop instead of react-select's one
|
||||||
disabled,
|
disabled,
|
||||||
|
filterOption,
|
||||||
getOptionLabel,
|
getOptionLabel,
|
||||||
getOptionValue,
|
getOptionValue,
|
||||||
inputValue,
|
inputValue,
|
||||||
|
@ -14,6 +14,7 @@ export interface SelectCommonProps<T> {
|
|||||||
components?: any;
|
components?: any;
|
||||||
defaultValue?: any;
|
defaultValue?: any;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
filterOption?: (option: SelectableValue, searchQuery: string) => void;
|
||||||
/** Function for formatting the text that is displayed when creating a new value*/
|
/** Function for formatting the text that is displayed when creating a new value*/
|
||||||
formatCreateLabel?: (input: string) => string;
|
formatCreateLabel?: (input: string) => string;
|
||||||
getOptionLabel?: (item: SelectableValue<T>) => string;
|
getOptionLabel?: (item: SelectableValue<T>) => string;
|
||||||
|
Loading…
Reference in New Issue
Block a user