react-native-bottom-sheet
react-native-bottom-sheet copied to clipboard
[v4] | [v2] Janky bottom sheet dynamic size if using `BottomSheetTextInput`
Bug
Janky bottom sheet dynamic size if using BottomSheetTextInput
BottomSheetTextInput
https://github.com/gorhom/react-native-bottom-sheet/assets/57757211/e6769106-1b98-4b91-8066-8ef295babe71
TextInput
https://github.com/gorhom/react-native-bottom-sheet/assets/57757211/962b74b7-3415-42f3-b485-2b0be41ba5f6
Environment info
| Library | Version |
|---|---|
| @gorhom/bottom-sheet | 4.6.1 |
| react-native | 0.73.7 |
| react-native-reanimated | 3.8.1 |
| react-native-gesture-handler | 2.16.0 |
Steps To Reproduce
- Type something to the input
Describe what you expected to happen:
- Bottom sheet size changes smoothly
Reproducible sample code
const Component = () => {
const [text, setText] = useState("");
const ref = useRef(null);
useEffect(() => {
ref.current?.present();
}, []);
return (
<BottomSheetModal
ref={ref}
enableDynamicSizing
enableContentPanningGesture={false}
>
<BottomSheetTextInput className="py-10" value={text} onChangeText={setText} />
{text.split("").map((it) => (
<View className="h-1 bg-red py-1" />
))}
</BottomSheetModal>
);
};
I have a similar issue, annoying that the only fix I have found so far is manually setting the height. :/
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.
bump Do anyone with experience want try to fix the issue? @gorhom I can try by myself, but it will not be most efficient thing
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.
bump)
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.