danish1658 / react-native-dropdown-select-list

☝️ React Native Select List Equivalent to Html's Select with options"
https://www.npmjs.com/package/react-native-dropdown-select-list
MIT License
193 stars 90 forks source link

Search input placeholder text color not change. #95

Open HuzaiFa3030 opened 9 months ago

HuzaiFa3030 commented 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?

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

BCaceress commented 4 months ago

inputStyles={{ color: 'black' }}

alban-ameti commented 2 months ago

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