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

Twig: ModalDialog does not allow automatic modal opening #14

Open
literat opened this issue Apr 22, 2024 · 2 comments
Open

Twig: ModalDialog does not allow automatic modal opening #14

literat opened this issue Apr 22, 2024 · 2 comments

Comments

@literat
Copy link
Contributor

literat commented Apr 22, 2024

react has isOpen, twig no

web-twig will have an isOpen pass that sets the attribute data to a specific value, or rather aria attribute

give Modal a props isOpen that will set the open attribute and verify that our JS plugin works with it correctly
The JS plugin looks to see if the attribute open exists and calls showModal - only on initialization (constructor)!

@literat
Copy link
Contributor Author

literat commented Apr 22, 2024

It is not clear to me what the goal is. I.e. do I need to set Modal default as open? So when the page loads, Modal will open itself? The constructor of the Modal plugin has an argument isShown, i.e. new Modal(true). So more likely, maybe it's missing to complete the documentation.

@literat
Copy link
Contributor Author

literat commented Apr 22, 2024

Yes, that's right. We want to be able to have Twig Modal open itself when the page loads, once we pass the isOpen parameter, so we don't have to figure it out ourselves in TS.

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

1 participant