picker icon indicating copy to clipboard operation
picker copied to clipboard

the problem of selectionColor

Open Viennacacao opened this issue 11 months ago • 3 comments

Hello, I want to change the color of my number when it is selected, but I can't change it using selectionColor. The following is my code: eturn ( <View style={styles.container}> <Picker style={[styles.picker, {width: screenWidth / 4.5}]} selectedValue={selectedHour} onValueChange={itemValue => setSelectedHour(itemValue)} selectionColor={processColor('#e83b30')}> {[...Array(12)].map((_, index) => ( <Picker.Item label={${index + 1}} value={${index + 1}} key={index} selectionColor="#e83b3e" /> ))} </Picker> In addition, I also want to change the color of the gray rectangular selection box in the middle. How should I change it? image

Viennacacao avatar Mar 21 '24 10:03 Viennacacao

same issue

gufengpiaoyi avatar Mar 27 '24 02:03 gufengpiaoyi

This appears to be a regression -- you can get it working by falling back to 2.4.9.

h/t @AdePhil https://github.com/react-native-picker/picker/issues/294#issuecomment-1871253377

tctrautman avatar Apr 01 '24 18:04 tctrautman

Downgrading to v2.4.9 didn't resolve the issue either. If possible, could you provide sample code that works? Thank you!

Alternatively, are there any other solutions available?

mayone-du avatar May 02 '24 17:05 mayone-du