You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using this library every time I need to create a user-interface and I must say its so awesome having all these components implementations ready to go.
However I noticed that certain elements don't behave exactly how you'd expect them to.
For example the Dialog component ignores the open property if it is closed for some reason which can also break it, making it not open again.
The event for closing the dialog isn't cancellable either.
I went around this by setting open and preventOutsideDismiss to always be true, and then wrap the whole thing in CSSTransition using the CSSTransition "in" prop to animate the dialog in or out only when open changes.
This could also be done without CSS Transition like so
The scrim can also be reimplemented by adding a div element before or just after the Dialog component with absolute positioning to cover the whole screen and giving it a onClick handler for setting open (you may also needs to play with z-index however don't set it higher than 6 otherwise your scrim will be in front of your dialog)
the following css also needs to be added otherwise our custom scrim won't get a onClick event.
also don't use the DialogButton components as clicking these closes the Dialog also (MDC implementation).
regular Button components look the same and don't exhibit this behaviour.
The text was updated successfully, but these errors were encountered:
Hi, just to verify, are you using strict mode? Right now there is an issue with some components not working in strictmode. This is a much bigger problem that we would love to address, but is a bit difficult. If you are using strictmode, try to disable it. If not, I'll take a look at this bug. Thanks!
I've been using this library every time I need to create a user-interface and I must say its so awesome having all these components implementations ready to go.
However I noticed that certain elements don't behave exactly how you'd expect them to.
For example the Dialog component ignores the open property if it is closed for some reason which can also break it, making it not open again.
The event for closing the dialog isn't cancellable either.
I went around this by setting open and preventOutsideDismiss to always be true, and then wrap the whole thing in CSSTransition using the CSSTransition "in" prop to animate the dialog in or out only when open changes.
This could also be done without CSS Transition like so
The scrim can also be reimplemented by adding a div element before or just after the Dialog component with absolute positioning to cover the whole screen and giving it a onClick handler for setting open (you may also needs to play with z-index however don't set it higher than 6 otherwise your scrim will be in front of your dialog)
the following css also needs to be added otherwise our custom scrim won't get a onClick event.
also don't use the DialogButton components as clicking these closes the Dialog also (MDC implementation).
regular Button components look the same and don't exhibit this behaviour.
The text was updated successfully, but these errors were encountered: