Search: Add filterOption prop to Select (#24213)

This commit is contained in:
Alex Khomenko 2020-05-04 12:43:09 +03:00 committed by GitHub
parent 8a88632791
commit 6768fb3672
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -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,

View File

@ -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;