Skip to content
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] Janky bottom sheet dynamic size if using BottomSheetTextInput #1821

Open
XantreDev opened this issue May 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@XantreDev
Copy link

XantreDev commented May 1, 2024

Bug

Janky bottom sheet dynamic size if using BottomSheetTextInput
BottomSheetTextInput

bottom-sheet-input.mp4

TextInput

bottom-sheet-regular-input.mp4

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>
  );
};
@col-lefevre
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants