danish1658 / react-native-dropdown-select-list

☝️ React Native Select List Equivalent to Html's Select with options"
https://www.npmjs.com/package/react-native-dropdown-select-list
MIT License
200 stars 89 forks source link

SelectListOver Content / zIndex #58

Open milhouse34521 opened 1 year ago

milhouse34521 commented 1 year ago

Is there a way to have the SelectList display over content? When the SelectList is closed, the content below it is correctly placed. But when I select the SelectBox, the content below it scrolls down. Is there a way to display to dropdown over content, rather than moving it? I've tried setting the zIndex of the View container, using the style attribute, the dropdownStyles attribute etc. but not luck.

<SelectList 
  placeholder="Select a Category"
  setSelected={(val) => setCurrentCategoryId(val)} 
  data={gearCategories} 
  save="key"
  search={false}
  maxHeight="175"
  dropdownStyles={{ zIndex: 5}}
/>
Hassan-1995 commented 1 year ago

same issue

forhadmia1 commented 1 year ago

Having the same issue, I give the dropdownStyle position absolute, top 100% left 0, Now it's not moving next element to it. Now the issue is it's not visible over the element, I tried zIndex to show it on top. but not working.

sreehari-cyberonics commented 1 year ago

Note: Avoid height for parent view which wrap selectList eg: `

        </View> `

to, `

   </View> `
josh-thompson13 commented 1 year ago

I'm having the same issue, anyone have a workaround ?

mudassir-rafiq-007 commented 9 months ago

On iOS, wrap SelectList in a view and provide higher zIndex to that view than the other content. Also provide the height to the view.