Skip to content

Conversation

@souyahia
Copy link
Contributor

@souyahia souyahia commented May 5, 2025

Please provide enough information so that others can review your pull request:

Add fromPosition and toPosition params to the onAnimate event.

Motivation

There are certain cases where this could be useful (we already have the position info in the onChange callback). For example, when the sheets is animating to a position that is not part of the specified snap points, the toIndex will be -1 (which is expected since the snap point does not exist) even though the sheet will be closed. See this issue for instance.

@gorhom gorhom force-pushed the souyahia/on-animate-position-params branch from f94bb72 to 54f52e1 Compare June 3, 2025 20:01
@gorhom gorhom merged commit 898270e into gorhom:master Jun 3, 2025
@gorhom
Copy link
Owner

gorhom commented Jun 3, 2025

thanks @souyahia for this PR, it should be release shortly

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants