| 10 | | 'filterOption'; |
| 11 | |
| 12 | export interface AsyncAdditionalProps<Option, Group extends GroupBase<Option>> { |
| 13 | /** |
| 14 | * The default set of options to show before the user starts searching. When |
| 15 | * set to `true`, the results for loadOptions('') will be autoloaded. |
| 16 | */ |
| 17 | defaultOptions?: OptionsOrGroups<Option, Group> | boolean; |
| 18 | /** |
| 19 | * If cacheOptions is truthy, then the loaded data will be cached. The cache |
| 20 | * will remain until `cacheOptions` changes value. |
| 21 | */ |
| 22 | cacheOptions?: any; |
| 23 | /** |
| 24 | * Function that returns a promise, which is the set of options to be used |
| 25 | * once the promise resolves. |
| 26 | */ |
| 27 | loadOptions?: ( |
| 28 | inputValue: string, |
| 29 | callback: (options: OptionsOrGroups<Option, Group>) => void |
| 30 | ) => Promise<OptionsOrGroups<Option, Group>> | void; |
| 31 | /** |
| 32 | * Will cause the select to be displayed in the loading state, even if the |
| 33 | * Async select is not currently waiting for loadOptions to resolve |
| 34 | */ |
| 35 | isLoading?: boolean; |
| 36 | } |
| 37 | |
| 38 | export type AsyncProps< |
| 39 | Option, |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…