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

Closed
XantreDev opened this issue May 1, 2024 · 7 comments
Closed
Labels
bug Something isn't working no-issue-activity

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. :/

Copy link

github-actions bot commented Jun 8, 2024

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.

@XantreDev
Copy link
Author

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

Copy link

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.

@XantreDev
Copy link
Author

bump)

Copy link

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.

Copy link

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

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

No branches or pull requests

2 participants