diff --git a/components/lib/autocomplete/AutoComplete.js b/components/lib/autocomplete/AutoComplete.js index 9123a0a346..cf491c2e93 100644 --- a/components/lib/autocomplete/AutoComplete.js +++ b/components/lib/autocomplete/AutoComplete.js @@ -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, diff --git a/components/lib/autocomplete/autocomplete.d.ts b/components/lib/autocomplete/autocomplete.d.ts index d40c3a4b38..084468edec 100755 --- a/components/lib/autocomplete/autocomplete.d.ts +++ b/components/lib/autocomplete/autocomplete.d.ts @@ -110,6 +110,8 @@ export interface AutoCompleteProps extends Omit { + public show(): void; + public hide(): void; public search(event: React.SyntheticEvent, query: string, source: AutoCompleteSourceType): void; public getElement(): HTMLSpanElement; public getInput(): HTMLInputElement;