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

Document Show/Close Methods #385

Open
celsowhite opened this issue Nov 1, 2020 · 3 comments
Open

Document Show/Close Methods #385

celsowhite opened this issue Nov 1, 2020 · 3 comments

Comments

@celsowhite
Copy link

celsowhite commented Nov 1, 2020

Issue

There are instructions in the documentation for how to programmatically show/close the modal. See here. The show example doesn't fully explain how the show method functions and doesn't mention the second parameter (config).

If a user uses the show method they assume that it will open the modal with the same config as they used to init the modal. This is not the case, all config settings from the original init are replaced when using the show method.

I specifically faced this issue when trying to get my modal to close with a close animation. The awaitCloseAnimation property was reset when I used the show method.

Solution

Add a config parameter to the documentation and explicity state that when using that method you need to pass in a fresh config.

@fysherman
Copy link

That's what i need to know, i confused that config in init method apply to every modal.
Thanks

@Lovor01
Copy link

Lovor01 commented Nov 22, 2022

@celsowhite Your comment was a lifesaver! I was wondering for half an hour what is happening, why it does not work. Documentation is really insufficient.

@Dinver
Copy link

Dinver commented Jul 11, 2023

@celsowhite Thanks for help!

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

No branches or pull requests

4 participants