Open HuzaiFa3030 opened 9 months ago
when i use searching and i change the search icon and close button but i can't change the search placeholder text color any one can help me?
Hello, there is no color changing feature for "search placeholder", but you can add it yourself from the node_modules files.
For Example: go to "node_modules/react-native-dropdown-select-list/components/SelectList.tsx" then find "searchPlaceholder"
<TextInput placeholder={searchPlaceholder} placeholderTextColor={searchPlaceholderTextColor} //ADD THIS LANE! onChangeText={(val) => { let result = data.filter((item: L1Keys) => { val.toLowerCase(); let row = item.value.toLowerCase() return row.search(val.toLowerCase()) > -1; }); setFilteredData(result) }} style={[{padding:0,height:20,flex:1,fontFamily},inputStyles]} />
After doing these, you can use it like this:
<SelectList searchPlaceholderTextColor={'white'} //LIKE THIS! />
inputStyles={{ color: 'black' }}
inputStyles={{ color: 'black' }}
This doesn't work in the docs TextInput placeholder colour is set thru a separate prop. https://reactnative.dev/docs/textinput#placeholdertextcolor
when i use searching and i change the search icon and close button but i can't change the search placeholder text color any one can help me?