@esfaenza/es-table 19.2.37 → 19.2.38

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.
@@ -4279,6 +4279,7 @@ class EsTableComponent {
4279
4279
  this.firstCoordinates = null;
4280
4280
  //* Piango
4281
4281
  this.EsTdsCache = {};
4282
+ this.retries = 0;
4282
4283
  effect(() => {
4283
4284
  if (this.SearchView())
4284
4285
  this.arrayPulsanti.set(this.utilities_H.getPagesArray(6, this.SearchView().page, this.SearchView().pages || 1, this.SearchView().objectcount || this.SearchView().items.length, this.SearchView().itemsperpageoverride));
@@ -5609,18 +5610,29 @@ class EsTableComponent {
5609
5610
  });
5610
5611
  }
5611
5612
  //* Piango ancora
5612
- //* Gestione Embedding
5613
+ // Gestione Embedding
5613
5614
  showDialog(dlg, elementRef) {
5614
5615
  dlg.show();
5615
- if (this.emb.Embedded) {
5616
- this.rendererRef.setStyle(elementRef.nativeElement, "padding-top", "5%");
5617
- this.rendererRef.setStyle(elementRef.nativeElement, "margin-left", "-110px");
5618
- this.rendererRef.setStyle(elementRef.nativeElement, "width", "calc(100% + 110px)");
5619
- this.rendererRef.setStyle(elementRef.nativeElement, "overflow", "hidden");
5620
- this.doFixBody(elementRef);
5621
- let backdropHeight = dlg.backdrop.instance.element.nativeElement.clientHeight;
5622
- this.emb.MainWindow.postMessage({ type: "modal-open", backdropHeight: backdropHeight }, "*");
5616
+ this.retries = 0;
5617
+ if (this.emb.Embedded)
5618
+ this.doFixDialog(dlg, elementRef);
5619
+ }
5620
+ doFixDialog(dlg, elementRef) {
5621
+ this.retries++;
5622
+ let element = elementRef.nativeElement;
5623
+ if (!element) {
5624
+ if (this.retries > 10)
5625
+ return;
5626
+ setTimeout(() => this.doFixDialog(dlg, elementRef), 25);
5627
+ return;
5623
5628
  }
5629
+ this.rendererRef.setStyle(element, "padding-top", "5%");
5630
+ this.rendererRef.setStyle(element, "margin-left", "-110px");
5631
+ this.rendererRef.setStyle(element, "width", "calc(100% + 110px)");
5632
+ this.rendererRef.setStyle(element, "overflow", "hidden");
5633
+ this.doFixBody(elementRef);
5634
+ let backdropHeight = dlg.backdrop.instance.element.nativeElement.clientHeight;
5635
+ this.emb.MainWindow.postMessage({ type: "modal-open", backdropHeight: backdropHeight }, "*");
5624
5636
  }
5625
5637
  doFixBody(elementRef) {
5626
5638
  let body = elementRef.nativeElement.getElementsByClassName("modal-body")[0];