Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Commit

Permalink
fix: remove unused prop getters
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Feb 28, 2020
1 parent 40faec2 commit 074c92d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/autocomplete-core/src/propGetters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export function getPropGetters<TItem>({
store.send('focus', null);
}

const { inputElement, dropdownElement, ...rest } = providedProps;
const { inputElement, ...rest } = providedProps;

return {
'aria-autocomplete': props.showCompletion ? 'both' : 'list',
Expand Down
8 changes: 4 additions & 4 deletions packages/autocomplete-core/src/types/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export interface PublicAutocompleteOptions<TItem> {
*/
stallThreshold?: number;
/**
* The initial state to apply when the page is loaded.
* The initial state to apply when autocomplete is created.
*/
initialState?: Partial<AutocompleteState<TItem>>;
/**
Expand All @@ -194,14 +194,14 @@ export interface PublicAutocompleteOptions<TItem> {
| Promise<Array<PublicAutocompleteSource<TItem>>>;
/**
* 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<TItem>;
/**
Expand All @@ -218,7 +218,7 @@ export interface PublicAutocompleteOptions<TItem> {
* This turns the experience in controlled mode, leaving you in charge of
* updating the state.
*/
onInput?(params: OnInputParams<TItem>): void | Promise<any>;
onInput?(params: OnInputParams<TItem>): void;
}

// Props manipulated internally with default values.
Expand Down
1 change: 0 additions & 1 deletion packages/autocomplete-core/src/types/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export type GetFormProps = (props: {
export type GetInputProps = (props: {
[key: string]: unknown;
inputElement: HTMLInputElement;
dropdownElement: HTMLElement;
}) => {
id: string;
value: string;
Expand Down
1 change: 0 additions & 1 deletion packages/autocomplete-react/src/SearchBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})}
Expand Down

0 comments on commit 074c92d

Please sign in to comment.