react-native-dropdown-select-list icon indicating copy to clipboard operation
react-native-dropdown-select-list copied to clipboard

Search input placeholder text color not change.

Open HuzaiFa3030 opened this issue 1 year ago • 3 comments

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?

HuzaiFa3030 avatar Nov 07 '23 14:11 HuzaiFa3030

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! />

ahmetcangurel avatar Nov 26 '23 19:11 ahmetcangurel

inputStyles={{ color: 'black' }}

BCaceress avatar Apr 19 '24 14:04 BCaceress

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

alban-ameti avatar Jun 07 '24 05:06 alban-ameti