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.autofocusattribute instead ofdialog-focus. The first focusable child will be focused if none haveautofocus.<md-dialog> <div slot="content">Content</div> <div slot="actions"> <md-text-button>Close</md-text-button> - <md-text-button dialog-focus>OK</md-text-button> + <md-text-button autofocus>OK</md-text-button> </div> </md-dialog><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.openandcloseevents instead ofopeningandclosing. Both events are cancelable. Theopenedandclosedevents still fire.marginto change the layout spacing of a dialog instead of custom properties. Usemarginon the<md-dialog>itself to change its position on the screen.Beta Was this translation helpful? Give feedback.
All reactions