Skip to content

Commit

Permalink
Fix # #3387: Autocomplete add show/hide to ref (#3389)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Sep 29, 2022
1 parent a456118 commit 7f682d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/lib/autocomplete/AutoComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,8 @@ export const AutoComplete = React.memo(
React.useImperativeHandle(ref, () => ({
props,
search,
show,
hide,
getElement: () => elementRef.current,
getOverlay: () => overlayRef.current,
getInput: () => inputRef.current,
Expand Down
2 changes: 2 additions & 0 deletions components/lib/autocomplete/autocomplete.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ export interface AutoCompleteProps extends Omit<React.DetailedHTMLProps<React.In
}

export declare class AutoComplete extends React.Component<AutoCompleteProps, any> {
public show(): void;
public hide(): void;
public search(event: React.SyntheticEvent, query: string, source: AutoCompleteSourceType): void;
public getElement(): HTMLSpanElement;
public getInput(): HTMLInputElement;
Expand Down

0 comments on commit 7f682d7

Please sign in to comment.