mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 14:56:37 +00:00
Dismiss dialog if the user clicks outside it or hit the escape button (#6741)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
d8e88bc58d
commit
78a1e45be2
@ -90,7 +90,14 @@ export class DialogHassioNetwork extends LitElement implements HassDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<ha-dialog open .heading=${true} hideActions @closed=${this.closeDialog}>
|
<ha-dialog
|
||||||
|
open
|
||||||
|
scrimClickAction
|
||||||
|
escapeKeyAction
|
||||||
|
.heading=${true}
|
||||||
|
hideActions
|
||||||
|
@closed=${this.closeDialog}
|
||||||
|
>
|
||||||
<div slot="heading">
|
<div slot="heading">
|
||||||
<ha-header-bar>
|
<ha-header-bar>
|
||||||
<span slot="title">
|
<span slot="title">
|
||||||
|
@ -55,9 +55,9 @@ class DialogBox extends LitElement {
|
|||||||
return html`
|
return html`
|
||||||
<ha-dialog
|
<ha-dialog
|
||||||
open
|
open
|
||||||
scrimClickAction
|
?scrimClickAction=${this._params.prompt}
|
||||||
escapeKeyAction
|
?escapeKeyAction=${this._params.prompt}
|
||||||
@close=${this._close}
|
@closed=${this._dismiss}
|
||||||
.heading=${this._params.title
|
.heading=${this._params.title
|
||||||
? this._params.title
|
? this._params.title
|
||||||
: this._params.confirmation &&
|
: this._params.confirmation &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user