tags | Tag[] | The current tags to be rendered | yes | |
labelExtractor | (tag: Tag) => string | Determines what property of tags is displayed | yes | |
onChangeTags | (newTags: Tag[]) => void | called when tags change (i.e. by deleting), should be used to set tags | yes | |
suggestions | Suggestion[] | All possible suggestions | no | [] |
suggestionExtractor | (suggestion: Suggestion) => string | determines which property of suggestions is displayed | no | uses labelExtractor |
onSuggestionPress | (suggestion: Suggestion) => void | called when suggestion is pressed | no | calls onChangeTags with [...tags, pressedSuggestion] |
onTagPress | (tag: Tag) => void | called when tag is pressed | no | calls onChangeTags with the pressed tag removed |
renderSuggestion | (suggestion: Suggestion, onPress: (tag: Suggestion) => void) => Element | renders a custom suggestion component | no | |
renderTag | (tag: Tag, onPress: (tag: Tag) => void) => Element | renders a custom tag component | no | |
filterSuggestions | (text: string) => Suggestion[] | filters suggestions based on users text input | no | |
inputProps | TextInput props | any additional props for TextInput | no | |
flatListProps | FlatList props | any additional props for FlatList | no | |
allowCustomTags | boolean | whether or not to allow the user to create a Tag that doesn't come from suggestions | no | true |
parseChars | string[] | an array of characters that should trigger a new tag and clear the TextInput | no | [',', ' ', ';', '\n'] |
onAddNewTag | (userInput: string) => void | called when the user types a character in parseChars | no | calls onChangeTags with [...tags, userInputText] |