picker icon indicating copy to clipboard operation
picker copied to clipboard

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

Open josh-thompson13 opened this issue 3 years ago • 1 comments

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) } > <Picker.Item label="Java" value="java" /> <Picker.Item label="JavaScript" value="js" /> </Picker>`

josh-thompson13 avatar Dec 05 '22 01:12 josh-thompson13

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

jorszs avatar Jan 16 '23 22:01 jorszs