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

Commit

Permalink
fix(core): add type search to getInputProps
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Aug 19, 2020
1 parent 1c2551b commit 92d95cc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/autocomplete-core/src/propGetters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ export function getPropGetters<TItem, TEvent, TMouseEvent, TKeyboardEvent>({
autoFocus: props.autoFocus,
placeholder: props.placeholder,
maxLength,
type: 'search',
onChange: (event) => {
onInput({
query: (((event as unknown) as Event)
Expand Down
1 change: 1 addition & 0 deletions packages/autocomplete-core/src/types/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export type GetInputProps<TEvent, TMouseEvent, TKeyboardEvent> = (props: {
autoCapitalize: 'on' | 'off';
spellCheck: boolean;
maxLength: number;
type: 'search';
'aria-autocomplete': 'none' | 'inline' | 'list' | 'both';
'aria-activedescendant': string | undefined;
'aria-controls': string | undefined;
Expand Down
1 change: 0 additions & 1 deletion packages/docsearch-react/src/SearchBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export function SearchBox(props: SearchBoxProps) {
ref={props.inputRef}
{...props.getInputProps({
inputElement: props.inputRef.current!,
type: 'search',
autoFocus: props.autoFocus,
maxLength: MAX_QUERY_SIZE,
})}
Expand Down

0 comments on commit 92d95cc

Please sign in to comment.