picker icon indicating copy to clipboard operation
picker copied to clipboard

bug: don't work: no label and no value

Open 332lfgb6 opened this issue 1 year ago • 8 comments

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

const CompPicker = () => {
  const [selectedLanguage, setSelectedLanguage] = useState();

  return (
    <>
      <Picker
        mode="dropdown"
        selectedValue={selectedLanguage}
        onValueChange={(itemValue, itemIndex) => setSelectedLanguage(itemValue)}
      >
        <Picker.Item label="Java" value="java" />
        <Picker.Item label="JavaScript" value="js" />
      </Picker>
      <Text style={{ marginTop: 100 }}>zzz</Text>
    </>
  );
};

export default CompPicker;

image

332lfgb6 avatar Dec 02 '23 17:12 332lfgb6

I have same issue. Please Help!

AlperenLogo avatar Dec 06 '23 10:12 AlperenLogo

Same issue

PhilipRudzinsky avatar Dec 06 '23 19:12 PhilipRudzinsky

I have the same issue. ver 2.5.1 seems to work for me

nzeris avatar Dec 08 '23 19:12 nzeris

I added the prop style={{ fontSize: 14 }}, and it works for me: <Picker.Item label={item} value={item} key={item} style={{ fontSize: 14 }} />

dbatrakov1 avatar Dec 09 '23 15:12 dbatrakov1

style={{ fontSize: 14 }}

This works for me! Thank you!

dancosta-fed avatar Dec 12 '23 20:12 dancosta-fed

I added the prop style={{ fontSize: 14 }}, and it works for me: <Picker.Item label={item} value={item} key={item} style={{ fontSize: 14 }} />

Setting font size also worked for me - glad I checked out the issues tab! Thank you 🙌🏻

LushawnDev avatar Dec 21 '23 15:12 LushawnDev

fontSize working but I cant do it on all my pickers. Any chance they will release a fix?

RafaelCENG avatar Dec 22 '23 10:12 RafaelCENG

the fontSize has made no difference to mine.

Edit: I am using expo and once I created a new development build it worked just fine. Must have been a mismatch of native and javascript versions I guess.

jmarks-joshua avatar Feb 06 '24 16:02 jmarks-joshua