Add event listener to close dialog.
This commit is contained in:
parent
d4038bbe37
commit
5a69cc65e6
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tp/tp-dialog",
|
"name": "@tp/tp-dialog",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "tp-dialog.js",
|
"main": "tp-dialog.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -81,11 +81,13 @@ class TpDialog extends EventHelpers(LitElement) {
|
|||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
this.listen(this, 'click', '_onDialogClick');
|
this.listen(this, 'click', '_onDialogClick');
|
||||||
|
this.listen(this, 'dialog-close', 'close');
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnectedCallback() {
|
disconnectedCallback() {
|
||||||
super.disconnectedCallback();
|
super.disconnectedCallback();
|
||||||
this.unlisten(this, 'click', '_onDialogClick');
|
this.unlisten(this, 'click', '_onDialogClick');
|
||||||
|
this.unlisten(this, 'dialog-close', 'close');
|
||||||
}
|
}
|
||||||
|
|
||||||
show() {
|
show() {
|
||||||
|
Loading…
Reference in New Issue
Block a user