From 1b269424bbbebf192a3910780008dc22772b44f7 Mon Sep 17 00:00:00 2001 From: Sami Jaber Date: Mon, 11 Jun 2018 20:35:31 -0400 Subject: [PATCH] react-autocomplete: add Input element methods --- types/react-autocomplete/index.d.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/types/react-autocomplete/index.d.ts b/types/react-autocomplete/index.d.ts index c1e3aefa0f..58339d3b31 100644 --- a/types/react-autocomplete/index.d.ts +++ b/types/react-autocomplete/index.d.ts @@ -144,4 +144,16 @@ declare namespace Autocomplete { debug?: boolean; } } -declare class Autocomplete extends Component {} +declare class Autocomplete extends Component { + /** + * Autocomplete exposes a subset of `HTMLInputElement` properties to the parent component. + * They can be accessed through Autocomplete's `ref` prop. + */ + blur: HTMLInputElement['blur']; + checkValidity: HTMLInputElement['checkValidity']; + click: HTMLInputElement['click']; + focus: HTMLInputElement['focus']; + select: HTMLInputElement['select']; + setCustomValidity: HTMLInputElement['setCustomValidity']; + setSelectionRange: HTMLInputElement['setSelectionRange']; +}