Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/components/Picker/BasePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ function BasePicker<TPickerValue>(
// reference to @react-native-picker/picker
const picker = useRef<RNPickerSelect>(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;
Expand Down Expand Up @@ -152,6 +148,10 @@ function BasePicker<TPickerValue>(
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) {
Expand Down