@melodicdev/components 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18635,12 +18635,23 @@ var _ref;
18635
18635
  var DialogComponent = class DialogComponent$1 {
18636
18636
  constructor() {
18637
18637
  this._dialogID = newID();
18638
+ this._registered = false;
18638
18639
  }
18639
18640
  onCreate() {
18640
- this._dialogEl = this.elementRef.shadowRoot?.querySelector("dialog");
18641
+ this.registerDialog();
18642
+ }
18643
+ onRender() {
18644
+ this.registerDialog();
18645
+ }
18646
+ registerDialog() {
18647
+ if (this._registered) return;
18648
+ const dialogEl = this.elementRef.shadowRoot?.querySelector("dialog");
18649
+ if (!dialogEl) return;
18650
+ this._dialogEl = dialogEl;
18641
18651
  this._dialogID = this.createDialogID();
18642
18652
  this._dialogEl.id = this._dialogID;
18643
18653
  this._dialogRef = this._dialogService.addDialog(this._dialogID, this._dialogEl);
18654
+ this._registered = true;
18644
18655
  }
18645
18656
  onDestroy() {
18646
18657
  this._dialogService.removeDialog(this._dialogID);