@esfaenza/es-table 15.2.36 → 15.2.37

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.
@@ -4221,6 +4221,7 @@ class EsTableComponent {
4221
4221
  this.firstCoordinates = null;
4222
4222
  //* Piango
4223
4223
  this.EsTdsCache = {};
4224
+ this.retries = 0;
4224
4225
  // Copia e incolla si effettuano solo se la tabella attuale è univocamente selezionata
4225
4226
  this.copySubscription = this.copyPasteDetector.OnCopy.subscribe(() => { if (this.copyPasteDetector.ActiveEstReference == this)
4226
4227
  this.handleCopy(); });
@@ -5499,18 +5500,29 @@ class EsTableComponent {
5499
5500
  this.EsTdsCache[`${event.id}_${event.hash}`] = event.self;
5500
5501
  }
5501
5502
  //* Piango ancora
5502
- //* Gestione Embedding
5503
+ // Gestione Embedding
5503
5504
  showDialog(dlg, elementRef) {
5504
5505
  dlg.show();
5505
- if (this.emb.Embedded) {
5506
- this.rendererRef.setStyle(elementRef.nativeElement, "padding-top", "5%");
5507
- this.rendererRef.setStyle(elementRef.nativeElement, "margin-left", "-110px");
5508
- this.rendererRef.setStyle(elementRef.nativeElement, "width", "calc(100% + 110px)");
5509
- this.rendererRef.setStyle(elementRef.nativeElement, "overflow", "hidden");
5510
- this.doFixBody(elementRef);
5511
- let backdropHeight = dlg.backdrop.instance.element.nativeElement.clientHeight;
5512
- this.emb.MainWindow.postMessage({ type: "modal-open", backdropHeight: backdropHeight }, "*");
5506
+ this.retries = 0;
5507
+ if (this.emb.Embedded)
5508
+ this.doFixDialog(dlg, elementRef);
5509
+ }
5510
+ doFixDialog(dlg, elementRef) {
5511
+ this.retries++;
5512
+ let element = elementRef.nativeElement;
5513
+ if (!element) {
5514
+ if (this.retries > 10)
5515
+ return;
5516
+ setTimeout(() => this.doFixDialog(dlg, elementRef), 25);
5517
+ return;
5513
5518
  }
5519
+ this.rendererRef.setStyle(element, "padding-top", "5%");
5520
+ this.rendererRef.setStyle(element, "margin-left", "-110px");
5521
+ this.rendererRef.setStyle(element, "width", "calc(100% + 110px)");
5522
+ this.rendererRef.setStyle(element, "overflow", "hidden");
5523
+ this.doFixBody(elementRef);
5524
+ let backdropHeight = dlg.backdrop.instance.element.nativeElement.clientHeight;
5525
+ this.emb.MainWindow.postMessage({ type: "modal-open", backdropHeight: backdropHeight }, "*");
5514
5526
  }
5515
5527
  doFixBody(elementRef) {
5516
5528
  let body = elementRef.nativeElement.getElementsByClassName("modal-body")[0];