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

sl-dialog cannot be initially open #255

Closed
matthewp opened this issue Oct 23, 2020 · 4 comments
Closed

sl-dialog cannot be initially open #255

matthewp opened this issue Oct 23, 2020 · 4 comments
Assignees
Labels
bug Things that aren't working right in the library.

Comments

@matthewp
Copy link

Describe the bug

If you include the open attribute in the html like so:

<sl-dialog open></sl-dialog>

The dialog will not be open. It only becomes open if you mutate the open attribute post-connect.

@matthewp matthewp added the bug Things that aren't working right in the library. label Oct 23, 2020
@matthewp
Copy link
Author

I think this can be fixed by setting isVisible to the value of this.open in the connectedCallback.

@claviska
Copy link
Member

Thanks. That does indeed fix it. Also pushed a fix to prevent a re-render by moving the initial open logic to componentWillLoad().

@matthewp
Copy link
Author

Wow, thanks for the quick fix. 🙏 Any chance you plan on doing another beta any time soon?

@claviska
Copy link
Member

Probably tomorrow — few more things left to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things that aren't working right in the library.
Projects
None yet
Development

No branches or pull requests

2 participants