Skip to content
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

[v4] Ability to present modal with specific animation (or instantly) #915

Closed
elan opened this issue Apr 14, 2022 · 4 comments · Fixed by #943
Closed

[v4] Ability to present modal with specific animation (or instantly) #915

elan opened this issue Apr 14, 2022 · 4 comments · Fixed by #943
Labels
enhancement New feature or request modal Related to BottomSheetModal v4 Written in Reanimated v2

Comments

@elan
Copy link
Contributor

elan commented Apr 14, 2022

Feature Request

When you call .present on a BottomSheetModal there are no parameters and it slides up using the standard animation.

Why it is needed

With things like a player modal which you might want to display on startup, the animation is distracting. If it could be displayed instantly it would help give the sense of "restoring" the state of the modal.

Possible implementation

.present(instant: boolean = false) or via animation config.

Code sample

Per above, being able to pass in either a flag or animation config.

@elan elan added the enhancement New feature or request label Apr 14, 2022
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@gorhom gorhom added v4 Written in Reanimated v2 modal Related to BottomSheetModal and removed no-issue-activity labels May 14, 2022
@gorhom
Copy link
Owner

gorhom commented May 14, 2022

this is possible by providing animateOnMount with false value, however this prop is not exposed, i will add it on the next release

animateOnMount={false}

@elan
Copy link
Contributor Author

elan commented May 14, 2022

oh awesome, thank you!

@elan
Copy link
Contributor Author

elan commented May 21, 2022

Actually, I'm not sure that'll work like I was hoping; basically I want it to render the modal fully presented the first time in some cases. Using animateOnMount={false} still renders it invisible and then I trigger the present right after which makes it appear, but it still shows the app for a few frames before the full-screen modal.

Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request modal Related to BottomSheetModal v4 Written in Reanimated v2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants