Skip to content

feat: Add position params in onAnimate event #2271

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

souyahia
Copy link

@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.

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.

1 participant