Search: Add filterOption prop to Select (#24213)

(cherry picked from commit 6768fb3672)
This commit is contained in:
Alex Khomenko
2020-05-07 14:59:21 +02:00
committed by Arve Knudsen
parent b12a2914c1
commit 7be6603e54
2 changed files with 3 additions and 0 deletions
@@ -98,6 +98,7 @@ export function SelectBase<T>({
defaultOptions,
defaultValue,
disabled = false,
filterOption,
formatCreateLabel,
getOptionLabel,
getOptionValue,
@@ -176,6 +177,7 @@ export function SelectBase<T>({
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,
@@ -14,6 +14,7 @@ export interface SelectCommonProps<T> {
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<T>) => string;