Skip to content

feat(swmansion): emit onIndexChange on programmatic open#31

Merged
arekkubaczkowski merged 1 commit into
mainfrom
feat/swmansion-onindexchange-open
Jun 8, 2026
Merged

feat(swmansion): emit onIndexChange on programmatic open#31
arekkubaczkowski merged 1 commit into
mainfrom
feat/swmansion-onindexchange-open

Conversation

@arekkubaczkowski

Copy link
Copy Markdown
Owner

The native onIndexChange only fires for user-driven snaps and onSettle only reports the end of the animation. Since the manager owns the index (not the consumer), there was no way to react to the start of a programmatic open — e.g. to fire a haptic on open. Emit onIndexChange(openIndex) from expand() so consumers get an immediate open signal; user-driven snaps are unchanged.

The native onIndexChange only fires for user-driven snaps and onSettle only
reports the end of the animation. Since the manager owns the index (not the
consumer), there was no way to react to the start of a programmatic open — e.g.
to fire a haptic on open. Emit onIndexChange(openIndex) from expand() so
consumers get an immediate open signal; user-driven snaps are unchanged.
@arekkubaczkowski arekkubaczkowski merged commit 3bd9ade into main Jun 8, 2026
3 checks passed
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