How to implement autocomplete with color changing

image

I am using ‘react-native-autocomplete-input’ to implement autocomplete function.
But I can’t change text color.
How can I do it?
Your help will be greatly appreciated.
Thanks.

I found the solution myself.

<Autocomplete
returnKeyType=“search”
data={recentSearchWords.length === 1 && comp(query, recentSearchWords[0]) ? : recentSearchWords}
defaultValue={query}
onChangeText={async (text) => {
await this.setState({ query: “!!!”, searchBoxFocused:true }) // important
await this.setState({ query: text, searchBoxFocused:true })
}
}
placeholder=“Enter keywords”
renderItem={(keyword) => (
<TouchableOpacity onPress={() => this.setState({ query: keyword, searchBoxFocused:false })}>
<Text style={{ padding: 10 }}>
{keyword.substring(0, keyword.indexOf(query))}{query}
{keyword.substring(keyword.indexOf(query)+query.length)}
</Text>
</TouchableOpacity>
)}
/>