diff --git a/index.d.ts b/index.d.ts index 2f7ab48..30d8961 100644 --- a/index.d.ts +++ b/index.d.ts @@ -123,6 +123,10 @@ declare module 'react-native-select-dropdown' { * function callback when the search input text changes, this will automatically disable the dropdown's internal search to be implemented manually outside the component */ onChangeSearchInputText?: (searchText: string) => void; + /** + * search input text value for controlled search input + */ + searchInputTextValue?: string; /** * function returns React component for search input icon */ diff --git a/src/SelectDropdown.js b/src/SelectDropdown.js index 18f66b0..bfbaa9a 100644 --- a/src/SelectDropdown.js +++ b/src/SelectDropdown.js @@ -54,6 +54,7 @@ const SelectDropdown = ( renderSearchInputLeftIcon /* function returns React component for search input icon */, renderSearchInputRightIcon /* function returns React component for search input icon */, onChangeSearchInputText /* function callback when the search input text changes, this will automatically disable the dropdown's interna search to be implemented manually outside the component */, + searchInputTextValue /* search input text value for controlled search input */, }, ref, ) => { @@ -128,7 +129,7 @@ const SelectDropdown = ( search && (