@toolbox-web/grid-angular 0.19.3 → 0.19.4

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.
@@ -1963,7 +1963,7 @@ class GridAdapter {
1963
1963
  * };
1964
1964
  * ```
1965
1965
  */
1966
- getTypeDefault(type) {
1966
+ getTypeDefault(type, _gridEl) {
1967
1967
  if (!this.typeRegistry) {
1968
1968
  return undefined;
1969
1969
  }
@@ -3358,6 +3358,13 @@ const OVERLAY_STYLES = /* css */ `
3358
3358
  overflow: auto;
3359
3359
  }
3360
3360
 
3361
+ /* Hide panels that have not been initialised via initOverlay() yet.
3362
+ Prevents a flash-of-unstyled-content when the subclass defers
3363
+ the initOverlay call (e.g. via setTimeout or afterNextRender). */
3364
+ .tbw-overlay-panel:not([data-anchor-id]) {
3365
+ display: none;
3366
+ }
3367
+
3361
3368
  .tbw-overlay-panel:popover-open {
3362
3369
  display: block;
3363
3370
  }
@@ -3552,6 +3559,13 @@ class BaseOverlayEditor extends BaseGridEditor {
3552
3559
  document.addEventListener('pointerdown', (e) => this._onDocumentPointerDown(e), {
3553
3560
  signal: this._abortCtrl.signal,
3554
3561
  });
3562
+ // If the focus observer already fired before the panel was initialised
3563
+ // (e.g. initOverlay called from a deferred setTimeout), the showOverlay()
3564
+ // call was silently ignored because _panel was still null. Catch up now.
3565
+ if (this._getCell()?.classList.contains('cell-focus')) {
3566
+ this.showOverlay();
3567
+ this.onOverlayOpened();
3568
+ }
3555
3569
  }
3556
3570
  /**
3557
3571
  * Show the overlay panel.