fateh999 / react-native-paper-dropdown

Dropdown using react native paper TextInput and Menu
121 stars 72 forks source link

when click on dropdown its not opening #72

Open PradeepKpi opened 2 years ago

PradeepKpi commented 2 years ago

When we click on the dropdown the list is not showing

bombillazo commented 2 years ago

You need a state variable that controls the dropdown visibility. The component does not take care of that automatically.

cosnt [visible, setVisible] = useState(false);

<RNPDropDown
  visible={visible}
  ...
/>
NaveenKumarMFRL commented 1 year ago

You need a state variable that controls the dropdown visibility. The component does not take care of that automatically.

cosnt [visible, setVisible] = useState(false);

<RNPDropDown
  visible={visible}
  ...
/>

i have using visible props but also its not showing

angelxmoreno commented 1 year ago

@NaveenKumarMFRLshowing code helps. @bombillazo This is what I have and still nothing changes

<DropDown
    label={"Language"}
    mode={"outlined"}
    visible={true}
    showDropDown={() => setShowDropDown(true)}
    onDismiss={() => setShowDropDown(false)}
    value={colors}
    setValue={setColors}
    list={colorList}
/>

I am using:

"react-native-paper": "^5.8.0",
"react-native-paper-dropdown": "^1.0.7",
bombillazo commented 1 year ago

hey @angelxmoreno I'm no longer using RN, but perhaps it is due to incompatibility with the latest RNP versions since this component has not been updated in 2 years and RNP has been changing their components implementations.

Take a look at this issue: https://github.com/fateh999/react-native-paper-dropdown/issues/91

angelxmoreno commented 1 year ago

thanks for the assist @bombillazo . I'll reach out to @fateh999 and see if he needs help with the current PRs