Replies: 2 comments 2 replies
-
What's the best way to close the dialog now when a user clicks ok or cancel button in actions slot? Doesn't auto close anymore like it did with dialog-actions even if I use the |
Beta Was this translation helpful? Give feedback.
1 reply
-
Should |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
<md-dialog>
has an upcoming breaking change to align its API with the native<dialog>
element before our 1.0 launch.Here is an example of a simple dialog with the new API.
Follow these steps to upgrade:
slot="content"
root instead of default content.slot="actions"
root instead of multipleslot="footer"
elements.slot="headline"
andslot="icon"
instead ofslot="header"
,slot="headline-prefix"
, andslot="headline-suffix"
elements.autofocus
attribute instead ofdialog-focus
. The first focusable child will be focused if none haveautofocus
.<form method="dialog">
to semantically handle closing instead ofdialog-action
. Add avalue="return-value"
attribute to determine which button closed the dialog (read withdialog.returnValue
).footerHidden
. If there are no slotted actions, it will not be shown.open
andclose
events instead ofopening
andclosing
. Both events are cancelable. Theopened
andclosed
events still fire.margin
to change the layout spacing of a dialog instead of custom properties. Usemargin
on the<md-dialog>
itself to change its position on the screen.Beta Was this translation helpful? Give feedback.
All reactions