From cbcc683dee58d7e9fb32869dc2b28e1eb0653709 Mon Sep 17 00:00:00 2001 From: ksnil <31514072+ksnil@users.noreply.github.com> Date: Tue, 23 Oct 2018 00:15:51 +0800 Subject: [PATCH] Fix handleFilterSuggestions return type (#29912) --- types/react-tag-input/index.d.ts | 2 +- types/react-tag-input/react-tag-input-tests.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/react-tag-input/index.d.ts b/types/react-tag-input/index.d.ts index c6f905788f..39654e5b31 100644 --- a/types/react-tag-input/index.d.ts +++ b/types/react-tag-input/index.d.ts @@ -19,7 +19,7 @@ export interface ReactTagsProps { handleDelete: ((i: number) => void); handleDrag?: ((tag: { id: string; text: string; }, currPos: number, newPos: number) => void); handleInputChange?: ((value: string) => void); - handleFilterSuggestions?: ((textInputValue: string, possibleSuggestionsArray: Array<{ id: string, text: string }>) => boolean); + handleFilterSuggestions?: ((textInputValue: string, possibleSuggestionsArray: Array<{ id: string, text: string }>) => Array<{ id: string, text: string }>); handleInputBlur?: ((textInputValue: string) => void); autofocus?: boolean; diff --git a/types/react-tag-input/react-tag-input-tests.tsx b/types/react-tag-input/react-tag-input-tests.tsx index 173f54f98c..b4a8e51857 100644 --- a/types/react-tag-input/react-tag-input-tests.tsx +++ b/types/react-tag-input/react-tag-input-tests.tsx @@ -18,7 +18,7 @@ ReactDOM.render( handleDelete={(i: number) => console.log("Delete: " + i)} handleDrag={(tag: { id: string; text: string; }, currPos: number, newPos: number) => console.log("Drag: " + tag.text)} handleInputChange={(value: string) => console.log("Changed to: ", value)} - handleFilterSuggestions={(textInputValue: string, possibleSuggestionsArray: Array<{ id: string, text: string }>) => true} + handleFilterSuggestions={(textInputValue: string, possibleSuggestionsArray: Array<{ id: string, text: string }>) => suggestions} handleInputBlur={() => console.log("Blured")} autofocus={false}