Home > front end >  dropdownpicker is hiding behind the Flat List
dropdownpicker is hiding behind the Flat List

Time:12-28

I have two dropdown picker, these two are dependent on each other and I'm facing two issues: first: my dropdown is hiding behind the flat list. second: if I click on one drop down second drop down should show the result but it shows result when I click on first dropdown twice. Here is the snack link: https://snack.expo.dev/@anamika1593/carlist

CodePudding user response:

I am facing similar issues last week if you are also using the react-native-dropdown-picker library.

There are two options(Both are the props of < DropDownPicker />):

  1. dropDownDirection
  2. zIndex

set dropDownDirection will force the open menu direction to the top but it should not be the best choice.

dropDownDirection="top"

setting zIndex to a bigger value will force the dropdown to appear on the top of the component and should be solve the issues.

containerStyle={{zIndex: 99}}

CodePudding user response:

user this property zIndex={1000}

<DropDownPicker zIndex={1000} ... />

  • Related