@@ -223,43 +223,44 @@ npm run ios
223223
224224## Options
225225
226- | ** Option** | ** Description** | ** Type** | ** Default** |
227- | ---------------------------------| ---------------------------------------------------------------------------------------------------------------| ----------------------| ---------------------------------------------|
228- | ` dataSet ` | set of list items | array | null |
229- | ` initialValue ` | string (** id** ) or object that contain ** id** | string \| object | null |
230- | ` loading ` | loading state | bool | false |
231- | ` useFilter ` | whether use local filter by dataSet (useful set to false for remote filtering to prevent rerender twice) | bool | true |
232- | ` showClear ` | show clear button | bool | true |
233- | ` showChevron ` | show chevron (open/close) button | bool | true |
234- | ` closeOnBlur ` | whether to close dropdown on blur | bool | false |
235- | ` closeOnSubmit ` | whether to close dropdown on submit | bool | false |
236- | ` clearOnFocus ` | whether to clear typed text on focus | bool | true |
237- | ` debounce ` | wait ** ms** before call ` onChangeText ` | number | 0 |
238- | ` suggestionsListMaxHeight ` | max height of dropdown | number | 200 |
239- | ` direction ` | "up" or "down" | string | down + auto calculate |
240- | ` position ` | "relative" or "absolute" | string | relative |
241- | ` bottomOffset ` | for calculate dropdown direction (e.g. tabbar) | number | 0 |
242- | ` onChangeText ` | event textInput onChangeText | function | |
243- | ` onSelectItem ` | event onSelectItem | function | |
244- | ` onOpenSuggestionsList ` | event onOpenSuggestionsList | function | |
245- | ` onChevronPress ` | event onChevronPress | function | |
246- | ` onClear ` | event on clear button press | function | |
247- | ` onSubmit ` | event on submit KB button press | function | |
248- | ` onBlur ` | event fired on text input blur | function | |
249- | ` onFocus ` | event on focus text input | function | |
250- | ` renderItem ` | JSX for render item ` (item, searchText) => JSX \| null ` if return null then the element will not be displayed | function | item.title |
251- | ` controller ` | return reference to module controller with methods ** close, open, toggle, clear, setInputText, setItem** | function | |
252- | ` containerStyle ` | | ViewStyle | |
253- | ` rightButtonsContainerStyle ` | | ViewStyle | |
254- | ` suggestionsListContainerStyle ` | | ViewStyle | |
255- | ` suggestionsListTextStyle ` | | TextStyle | styles of suggestions list text items |
256- | ` ChevronIconComponent ` | | React.Component | Feather chevron icon |
257- | ` ClearIconComponent ` | | React.Component | Feather x icon |
258- | ~~ ScrollViewComponent~~ | removed in 2.0.0 based on FlatList | React.Component name | ScrollView that provide suggestions content |
259- | ` EmptyResultComponent ` | replace the default ` <NothingFound> ` Component on empty result | React.Component | |
260- | ` emptyResultText ` | replace the default "Nothing found" text on empty result | string | "Nothing found" |
261- | ` textInputProps ` | text input props | TextInputProps | |
262- | ` flatListProps ` | props for \< FlatList/\> component | FlatListProps\< any\> | |
226+ | ** Option** | ** Description** | ** Type** | ** Default** |
227+ | --- | --- | --- | --- |
228+ | ` dataSet ` | set of list items | array | null |
229+ | ` initialValue ` | string (** id** ) or object that contain ** id** | string \| object | null |
230+ | ` loading ` | loading state | bool | false |
231+ | ` useFilter ` | whether use local filter by dataSet (useful set to false for remote filtering to prevent rerender twice) | bool | true |
232+ | ` showClear ` | show clear button | bool | true |
233+ | ` showChevron ` | show chevron (open/close) button | bool | true |
234+ | ` closeOnBlur ` | whether to close dropdown on blur | bool | false |
235+ | ` closeOnSubmit ` | whether to close dropdown on submit | bool | false |
236+ | ` clearOnFocus ` | whether to clear typed text on focus | bool | true |
237+ | ` debounce ` | wait ** ms** before call ` onChangeText ` | number | 0 |
238+ | ` suggestionsListMaxHeight ` | max height of dropdown | number | 200 |
239+ | ` direction ` | "up" or "down" | string | down + auto calculate |
240+ | ` position ` | "relative" or "absolute" | string | relative |
241+ | ` bottomOffset ` | for calculate dropdown direction (e.g. tabbar) | number | 0 |
242+ | ` onChangeText ` | event textInput onChangeText | function | |
243+ | ` onSelectItem ` | event onSelectItem | function | |
244+ | ` onOpenSuggestionsList ` | event onOpenSuggestionsList | function | |
245+ | ` onChevronPress ` | event onChevronPress | function | |
246+ | ` onClear ` | event on clear button press | function | |
247+ | ` onSubmit ` | event on submit KB button press | function | |
248+ | ` onBlur ` | event fired on text input blur | function | |
249+ | ` onFocus ` | event on focus text input | function | |
250+ | ` renderItem ` | JSX for render item ` (item, searchText) => JSX \| null ` if return null then the element will not be displayed | function | item.title |
251+ | ` controller ` | return reference to module controller with methods ** close, open, toggle, clear, setInputText, setItem** | function | |
252+ | ` containerStyle ` | | ViewStyle | |
253+ | ` rightButtonsContainerStyle ` | | ViewStyle | |
254+ | ` suggestionsListContainerStyle ` | | ViewStyle | |
255+ | ` suggestionsListTextStyle ` | | TextStyle | styles of suggestions list text items |
256+ | ` ChevronIconComponent ` | | React.Component | Feather chevron icon |
257+ | ` ClearIconComponent ` | | React.Component | Feather x icon |
258+ | ~~ ScrollViewComponent~~ | removed in 2.0.0 based on FlatList | React.Component name | ScrollView that provide suggestions content |
259+ | ` EmptyResultComponent ` | replace the default `` Component on empty result | React.Component | |
260+ | ` InputComponent ` | input element component | React.ComponentType | TextInput |
261+ | ` emptyResultText ` | replace the default "Nothing found" text on empty result | string | "Nothing found" |
262+ | ` textInputProps ` | text input props | TextInputProps | |
263+ | ` flatListProps ` | props for \ component | FlatListProps\ | |
263264
264265## Troubleshooting
265266
0 commit comments