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

How to leave it open by default #431

Closed
Lacerda53 opened this issue Jun 26, 2022 · 3 comments
Closed

How to leave it open by default #431

Lacerda53 opened this issue Jun 26, 2022 · 3 comments

Comments

@Lacerda53
Copy link

I need the modal behavior to be open by default and not closed, how could I solve the problem?

With useEffect?

@Lacerda53
Copy link
Author

Lacerda53 commented Jun 26, 2022

@jeremybarbet #432 solution

@Dani-Boy92
Copy link

How did you manage it?

the useEffect answer is also good for me if the merge takes to much time

@infinitesekai
Copy link

infinitesekai commented Mar 18, 2024

Apply UseEffect and setTimeout for the modal to display on entering screen.

useEffect(() => {
    setTimeout(() => visible ? ref.current.open() : ref.current.close(), 100);
  }, [visible])

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

3 participants