onInput.d.ts 905 B

123456789101112131415161718
  1. import { AutocompleteScopeApi, AutocompleteState, AutocompleteStore, BaseItem, InternalAutocompleteOptions } from './types';
  2. import { CancelablePromise } from './utils';
  3. interface OnInputParams<TItem extends BaseItem> extends AutocompleteScopeApi<TItem> {
  4. event: any;
  5. /**
  6. * The next partial state to apply after the function is called.
  7. *
  8. * This is useful when we call `onInput` in a different scenario than an
  9. * actual input. For example, we use `onInput` when we click on an item,
  10. * but we want to close the panel in that case.
  11. */
  12. nextState?: Partial<AutocompleteState<TItem>>;
  13. props: InternalAutocompleteOptions<TItem>;
  14. query: string;
  15. store: AutocompleteStore<TItem>;
  16. }
  17. export declare function onInput<TItem extends BaseItem>({ event, nextState, props, query, refresh, store, ...setters }: OnInputParams<TItem>): CancelablePromise<void>;
  18. export {};