From e10613266db79081bd75b7e632573d2c30f62768 Mon Sep 17 00:00:00 2001 From: mkhutornyi Date: Wed, 24 Jan 2024 06:57:09 +0100 Subject: [PATCH] fix android picker text color in light theme --- src/components/Picker/BasePicker.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Picker/BasePicker.tsx b/src/components/Picker/BasePicker.tsx index 678bb6f06403..1bee95532104 100644 --- a/src/components/Picker/BasePicker.tsx +++ b/src/components/Picker/BasePicker.tsx @@ -49,10 +49,6 @@ function BasePicker( // reference to @react-native-picker/picker const picker = useRef(null); - // Windows will reuse the text color of the select for each one of the options - // so we might need to color accordingly so it doesn't blend with the background. - const pickerPlaceholder = Object.keys(placeholder).length > 0 ? {...placeholder, color: theme.text} : {}; - useEffect(() => { if (!!value || !items || items.length !== 1 || !onInputChange) { return; @@ -152,6 +148,10 @@ function BasePicker( return theme.text; }, [theme]); + // Windows will reuse the text color of the select for each one of the options + // so we might need to color accordingly so it doesn't blend with the background. + const pickerPlaceholder = Object.keys(placeholder).length > 0 ? {...placeholder, color: itemColor} : {}; + const hasError = !!errorText; if (isDisabled) {