react-native-dropdown-select-list icon indicating copy to clipboard operation
react-native-dropdown-select-list copied to clipboard

SelectListOver Content / zIndex

Open milhouse34521 opened this issue 2 years ago • 5 comments

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}}
/>

milhouse34521 avatar Jan 31 '23 21:01 milhouse34521

same issue

Hassan-1995 avatar Feb 08 '23 23:02 Hassan-1995

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.

forhadmia1 avatar Feb 24 '23 06:02 forhadmia1

Note: Avoid height for parent view which wrap selectList eg: <View style={{height:100}}> <SelectList /> </View> to, <View> <SelectList /> </View>

sreehari-cyberonics avatar Feb 25 '23 05:02 sreehari-cyberonics

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

josh-thompson13 avatar Sep 11 '23 00:09 josh-thompson13

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.

mudassir-rafiq-007 avatar Nov 23 '23 10:11 mudassir-rafiq-007