MCPcopy
hub / github.com/JedWatson/react-select / AsyncAdditionalProps

Interface AsyncAdditionalProps

packages/react-select/src/useAsync.ts:12–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10 | 'filterOption';
11
12export 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
38export type AsyncProps<
39 Option,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…