react-native-bottom-sheet icon indicating copy to clipboard operation
react-native-bottom-sheet copied to clipboard

[v4] | [v2] Janky bottom sheet dynamic size if using `BottomSheetTextInput`

Open XantreDev opened this issue 1 year ago • 3 comments

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

  1. Type something to the input

Describe what you expected to happen:

  1. 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>
  );
};

XantreDev avatar May 01 '24 12:05 XantreDev

I have a similar issue, annoying that the only fix I have found so far is manually setting the height. :/

col-lefevre avatar May 09 '24 00:05 col-lefevre

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.

github-actions[bot] avatar Jun 08 '24 09:06 github-actions[bot]

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

XantreDev avatar Jun 08 '24 19:06 XantreDev

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.

github-actions[bot] avatar Jul 10 '24 09:07 github-actions[bot]

bump)

XantreDev avatar Jul 12 '24 15:07 XantreDev

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.

github-actions[bot] avatar Aug 13 '24 09:08 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Aug 19 '24 09:08 github-actions[bot]