react-native-picker / picker

Picker is a cross-platform UI component for selecting an item from a list of options.
MIT License
1.47k stars 277 forks source link

Selected picker item does not update selected value of picker when in Debug Mode #460

Open josh-thompson13 opened 1 year ago

josh-thompson13 commented 1 year ago

The picker on IOS does not update the selected value correctly when in debug mode. The selected value is updated in state, but is not reflected visually. You must click again the see the UI change. Here is the code I have implemented.

` import React, { useEffect, useState } from "react"; import { Picker } from "@react-native-picker/picker";

const [selectedLanguage, setSelectedLanguage] = useState();

<Picker selectedValue={selectedLanguage} onValueChange={(itemValue, itemIndex) => setSelectedLanguage(itemValue) }

`

jorszs commented 1 year ago

I have the same error, but only in somes devices.