@@ -264,48 +264,49 @@ yarn android
264264
265265## Options
266266
267- | ** Option** | ** Description** | ** Type** | ** Default** |
268- | --- | -----------------------------------------------------------------------------------------------------------------| --- | -----------------------------------------------|
269- | ` dataSet ` | set of list items | array | null |
270- | ` initialValue ` | string (** id** ) or object that contain ** id** | string \| object | null |
271- | ` loading ` | loading state | bool | false |
272- | ` useFilter ` | whether use local filter by dataSet (useful set to false for remote filtering to prevent rerender twice) | bool | true |
273- | ` showClear ` | show clear button | bool | true |
274- | ` showChevron ` | show chevron (open/close) button | bool | true |
275- | ` closeOnBlur ` | whether to close dropdown on blur | bool | false |
276- | ` closeOnSubmit ` | whether to close dropdown on submit | bool | false |
277- | ` clearOnFocus ` | whether to clear typed text on focus | bool | true |
278- | ` caseSensitive ` | whether to perform case-sensitive search | bool | false
279- | ` ignoreAccents ` | ignore diacritics | bool | true |
280- | ` trimSearchText ` | trim the searched text | bool | true |
281- | ` editable ` | is textInput editable | bool | true |
282- | ` debounce ` | wait ** ms** before call ` onChangeText ` | number | 0 |
283- | ` suggestionsListMaxHeight ` | max height of dropdown | number | 200 |
284- | ` direction ` | "up" or "down" | string | down + auto calculate |
285- | ` matchFrom ` | whether match suggestions from start of titles or anywhere in the title. Possible values are "any" or "start" | string | any |
286- | ` bottomOffset ` | for calculate dropdown direction (e.g. tabbar) | number | 0 |
287- | ` onChangeText ` | event textInput onChangeText | function | |
288- | ` onSelectItem ` | event onSelectItem | function | |
289- | ` onOpenSuggestionsList ` | event onOpenSuggestionsList | function | |
290- | ` onChevronPress ` | event onChevronPress | function | |
291- | ` onClear ` | event on clear button press | function | |
292- | ` onSubmit ` | event on submit KB button press | function | |
293- | ` onBlur ` | event fired on text input blur | function | |
294- | ` onFocus ` | event on focus text input | function | |
295- | ` renderItem ` | JSX for render item ` (item, searchText) => JSX \| null ` if return null then the element will not be displayed | function | item.title |
296- | ` controller ` | return reference to module controller with methods ** close, open, toggle, clear, setInputText, setItem** | function | |
297- | ` containerStyle ` | | ViewStyle | |
298- | ` rightButtonsContainerStyle ` | | ViewStyle | |
299- | ` suggestionsListContainerStyle ` | | ViewStyle | |
300- | ` suggestionsListTextStyle ` | | TextStyle | styles of suggestions list text items |
301- | ` ChevronIconComponent ` | | React.Component | Feather chevron icon |
302- | ` ClearIconComponent ` | | React.Component | Feather x icon |
303- | ~~ ScrollViewComponent~~ | removed in 2.0.0 based on FlatList | React.Component name | ScrollView that provide suggestions content |
304- | ` EmptyResultComponent ` | replace the default `` Component on empty result | React.Component | |
305- | ` InputComponent ` | input element component | React.ComponentType | TextInput |
306- | ` emptyResultText ` | replace the default "Nothing found" text on empty result | string | "Nothing found" |
307- | ` textInputProps ` | text input props | TextInputProps | |
308- | ` flatListProps ` | props for \ component | FlatListProps\ | |
267+ | Option | Description | Type | Default |
268+ | --------------------------------| ------------------------------------------------------------------------------------------------------------------| ---------------------| ------------------------------------------|
269+ | ` dataSet ` | Set of list items | array | null |
270+ | ` initialValue ` | String (** id** ) or object that contains ** id** | string \| object | null |
271+ | ` loading ` | Loading state | bool | false |
272+ | ` enableLoadingIndicator ` | Whether to show activity indicator on loading | bool | true |
273+ | ` useFilter ` | Whether to use local filter by dataSet (useful set to false for remote filtering to prevent rerender twice) | bool | true |
274+ | ` showClear ` | Show clear button | bool | true |
275+ | ` showChevron ` | Show chevron (open/close) button | bool | true |
276+ | ` closeOnBlur ` | Whether to close dropdown on blur | bool | false |
277+ | ` closeOnSubmit ` | Whether to close dropdown on submit | bool | false |
278+ | ` clearOnFocus ` | Whether to clear typed text on focus | bool | true |
279+ | ` caseSensitive ` | Whether to perform case-sensitive search | bool | false |
280+ | ` ignoreAccents ` | Ignore diacritics | bool | true |
281+ | ` trimSearchText ` | Trim the searched text | bool | true |
282+ | ` editable ` | Is textInput editable | bool | true |
283+ | ` debounce ` | Wait ** ms** before call ` onChangeText ` | number | 0 |
284+ | ` suggestionsListMaxHeight ` | Max height of dropdown | number | 200 |
285+ | ` direction ` | "up" or "down" | string | down + auto calculate |
286+ | ` matchFrom ` | Whether match suggestions from start of titles or anywhere in the title. Possible values are "any" or "start" | string | any |
287+ | ` bottomOffset ` | For calculate dropdown direction (e.g., tabbar) | number | 0 |
288+ | ` onChangeText ` | Event textInput onChangeText | function | |
289+ | ` onSelectItem ` | Event onSelectItem | function | |
290+ | ` onOpenSuggestionsList ` | Event onOpenSuggestionsList | function | |
291+ | ` onChevronPress ` | Event onChevronPress | function | |
292+ | ` onClear ` | Event on clear button press | function | |
293+ | ` onSubmit ` | Event on submit KB button press | function | |
294+ | ` onBlur ` | Event fired on text input blur | function | |
295+ | ` onFocus ` | Event on focus text input | function | |
296+ | ` renderItem ` | JSX for render item ` (item, searchText) => JSX \| null ` if return null then the element will not be displayed | function | item.title |
297+ | ` controller ` | Return reference to module controller with methods ** close, open, toggle, clear, setInputText, setItem** | function | |
298+ | ` containerStyle ` | | ViewStyle | |
299+ | ` rightButtonsContainerStyle ` | | ViewStyle | |
300+ | ` suggestionsListContainerStyle ` | | ViewStyle | |
301+ | ` suggestionsListTextStyle ` | | TextStyle | styles of suggestions list text items |
302+ | ` ChevronIconComponent ` | | React.Component | Feather chevron icon |
303+ | ` ClearIconComponent ` | | React.Component | Feather x icon |
304+ | ` EmptyResultComponent ` | Replace the default ` Component ` on empty result | React.Component | |
305+ | ` InputComponent ` | Input element component | React.ComponentType | TextInput |
306+ | ` emptyResultText ` | Replace the default "Nothing found" text on empty result | string | "Nothing found" |
307+ | ` textInputProps ` | Text input props | TextInputProps | |
308+ | ` flatListProps ` | Props for ` FlatList ` component | FlatListProps | |
309+
309310
310311## Usage with a Modal
311312
0 commit comments