Skip to content
Discussion options

You must be logged in to vote

From the current FormSheet source, there is no supported imperative API for selecting a new detent after the sheet is already open. initialDetentIndex is only applied on the closed → open transition, and onDetentChanged is a notification callback; changing that prop (or temporarily narrowing detents) is not a stable way to select a detent while preserving the full set.

For now, the reliable options are to let the user drag/select the detent, or close and reopen with the desired initialDetentIndex (which may not be suitable if you must preserve the presentation). An imperative ref/command that maps to iOS selectedDetentIdentifier (and the Android equivalent) would require a library change.

R…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@edding-3000
Comment options

Answer selected by edding-3000
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants