Open calinciubotariucinch opened 2 years ago
@calinciubotariucinch I had a similar problem because I was using absolute positioning for the dropdown. Does dropDownContainerStyle={{position: 'relative', }}
solve your problem by any chance?
Have you tried disabling <ScrollView />
when the picker is open?
<ScrollView
style={homeStyles.scrollView}
nestedScrollEnabled={true}
scrollEnabled={!open}
onScrollBeginDrag={() => setIsPressed(true)}
>...
With that, you can remove both onMomentumScrollBegin
and onMomentumScrollEnd
in your scrollViewProps
.
<DropDownPicker
listMode={'SCROLLVIEW'}
scrollViewProps={{
nestedScrollEnabled: true,
}}
...
/>
I had this same issue on android. From my experience, wrapping the dropdown picker inside a view is one major cause of this bug. Also when used together with a
<DropDownPicker onOpen={() => { setScroll(false); }} onClose={() => { setScroll(true); }} />
Problem:
I have a DropDownPicker inside a ScrollView in my RN project. When I try to scroll inside the dropdown list and the scroll reaches the bottom of the dropdown box list, then the parent ScrollView scrolls down.
What I tried to do is to catch when the inner ScrollView scrolls to disable the outer ScrollView. But unfortunately it does not work.
The weird thing is that on iOS I don't have this issue. On iOS, the inner scroll view just bounces.
Code:
setMainScrollState
enables/disables theenableMainScroll
stateDid anyone encountered this problem?
Thank you. Any info is much appreciated.