-
-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v4] | [v2] The enableDynamicSizing
feature does not recalculate when the size of the content changes.
#1536
Comments
Maybe I'm looking for something similar. I have a multiline TextField inside a BottomSheet, and I want it to start go up as far as new lines in input added. |
@JCYDigitalinnov I removed extra wrappers around input and it worked for me. UPD: sometimes it works, sometimes not. |
It worked only 2-3 times, then I always get the same behavior — looks like sheet stops increasing it's size once gets to latest snap point. For sure it's fine for me to have constraints where first value is start value, last value is end value and height won't be bigger than end value, but with that I'm having another issue - once keyboard opens the sheet expands to the full size. |
Unfortunately this feature is not stable. In my case, the height of content doesn't change yet enableDynamicSizing prop works arbitrarily. Sometimes it works first 2 or 3 times and after reloading app the height won't get calculated at all. But deprecated Obviously |
I've been able to fix the problem by wrapping inner content with import {
BottomSheetModal,
BottomSheetView
} from '@gorhom/bottom-sheet'
<BottomSheetModal
ref={bottomSheetModalRef}
animateOnMount={true}
enableDynamicSizing>
<BottomSheetView>
{title && <RenderHeader />}
{children}
</BottomSheetView>
</BottomSheetModal> I was using BottomSheetView inside RenderHeader component as well. I realized it was causing a weird behavior. Now it works fine even if I change the content size. |
Maybe it will work that way. But I have |
@JCYDigitalinnov I haven't tested with |
+1 |
+1, it works fine sometimes, and sometimes it looks like it just doesn't calculate the size at all and gives the sheet the minimum height. I was forced to go back to the old |
I got the same issue and fixed it by making sure there's no bottomsheet scrollable other than |
It's working for me but with a couple of problems. Firstly, when height of content height is changing the bottom sheet is jumping or not smoothly updating. Second problem, sometimes content height is not calculated and only background component is displaying. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
This is still an issue, is there any timeline for a fix? |
For me when |
Same on "@gorhom/bottom-sheet": "^4.6.4". Any fixes yet? |
@kavinraju have you found it ? |
I fixed this by getting rid of the |
Bug
At first,
enableDynamicSizing
works as expected. However, when the content of theBottomSheetModal
changes, it does not function properly. It does not re-calculate again for the height of the content.In this context, when the user performs a search in the
Flatlist
, the number of items changes, and as a result, the height of the content also changes.I used
react-native-gesture-handler
's FlatlistEnvironment info
Steps To Reproduce
Describe what you expected to happen:
Reproducible sample code
The text was updated successfully, but these errors were encountered: