Skip to content

Conversation

@t0maboro
Copy link
Contributor

@t0maboro t0maboro commented Oct 27, 2025

Description

When using 3 detents, the size of the formSheet is calculated based on the screen size and does not respect the detents. In this PR, I add a maxHeight to SheetBehavior when using 3 detents, ensuring the sheet respects the detent configuration. I also did a minor refactor of this variable for consistency.

Note:
In the example, I'm adding more TCs for better regression testing, but only 3 detents were broken

Note:
With this PR i noticed that the formsheet doesn't respect system bars, I started working on that issue separately: #3336

Fixes https://github.com/software-mansion/react-native-screens-labs/issues/458

Changes

  • Added maxHeight for sheetBehavior with 3 detents

Screenshots / GIFs

Here you can add screenshots / GIFs documenting your change.

You can add before / after section if you're changing some behavior.

Before

before.mov

After

after.mov

Test code and steps to reproduce

Added a new example for regression testing - with more examples than just the failing one, just in case.

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

Copy link
Contributor

@kligarski kligarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants