diff --git a/packages/autocomplete-core/src/propGetters.ts b/packages/autocomplete-core/src/propGetters.ts index 5bcf60904..b30b6d870 100644 --- a/packages/autocomplete-core/src/propGetters.ts +++ b/packages/autocomplete-core/src/propGetters.ts @@ -161,7 +161,7 @@ export function getPropGetters({ store.send('focus', null); } - const { inputElement, dropdownElement, ...rest } = providedProps; + const { inputElement, ...rest } = providedProps; return { 'aria-autocomplete': props.showCompletion ? 'both' : 'list', diff --git a/packages/autocomplete-core/src/types/api.ts b/packages/autocomplete-core/src/types/api.ts index cf817a768..9afa447b1 100644 --- a/packages/autocomplete-core/src/types/api.ts +++ b/packages/autocomplete-core/src/types/api.ts @@ -181,7 +181,7 @@ export interface PublicAutocompleteOptions { */ stallThreshold?: number; /** - * The initial state to apply when the page is loaded. + * The initial state to apply when autocomplete is created. */ initialState?: Partial>; /** @@ -194,14 +194,14 @@ export interface PublicAutocompleteOptions { | Promise>>; /** * The environment from where your JavaScript is running. - * Useful if you're using Autocomplete.js in a different context than + * Useful if you're using autocomplete in a different context than * `window`. * * @default window */ environment?: Environment; /** - * Navigator's API to redirect the user when a link should be open. + * Navigator API to redirect the user when a link should be opened. */ navigator?: Navigator; /** @@ -218,7 +218,7 @@ export interface PublicAutocompleteOptions { * This turns the experience in controlled mode, leaving you in charge of * updating the state. */ - onInput?(params: OnInputParams): void | Promise; + onInput?(params: OnInputParams): void; } // Props manipulated internally with default values. diff --git a/packages/autocomplete-core/src/types/getters.ts b/packages/autocomplete-core/src/types/getters.ts index bfb7beac0..0bd9ce3ff 100644 --- a/packages/autocomplete-core/src/types/getters.ts +++ b/packages/autocomplete-core/src/types/getters.ts @@ -41,7 +41,6 @@ export type GetFormProps = (props: { export type GetInputProps = (props: { [key: string]: unknown; inputElement: HTMLInputElement; - dropdownElement: HTMLElement; }) => { id: string; value: string; diff --git a/packages/autocomplete-react/src/SearchBox.tsx b/packages/autocomplete-react/src/SearchBox.tsx index c12c89fa7..22070111a 100644 --- a/packages/autocomplete-react/src/SearchBox.tsx +++ b/packages/autocomplete-react/src/SearchBox.tsx @@ -88,7 +88,6 @@ export function SearchBox(props: SearchBoxProps) { {...props.getInputProps({ ref: props.inputRef, inputElement: (props.inputRef as any).current, - dropdownElement: (props.dropdownRef as any).current, type: 'search', maxLength: '512', })}