igniteui-angular 21.2.22 → 21.2.23

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.
@@ -445,12 +445,11 @@ class PlatformUtil {
445
445
  * let column = this.grid.columnList.filter(c => c.field === 'ID')[0];
446
446
  *
447
447
  * let size = getNodeSizeViaRange(range, column.cells[0].nativeElement);
448
+ * ```
448
449
  *
449
450
  * @remarks
450
- * The last parameter is useful when the size of the element to measure is modified by a
451
- * parent element that has explicit size. In such cases the calculated size is never lower
452
- * and the function may instead remove the parent size while measuring to get the correct value.
453
- * ```
451
+ * While measuring, the last parameter (usually the node itself) is laid out at its `max-content` width,
452
+ * so neither its explicit width nor a stretching parent affects the result.
454
453
  */
455
454
  getNodeSizeViaRange(range, node, sizeHoldingNode) {
456
455
  let overflow = null;
@@ -463,7 +462,8 @@ class PlatformUtil {
463
462
  if (sizeHoldingNode) {
464
463
  const style = sizeHoldingNode.style;
465
464
  nodeStyles = [style.width, style.minWidth, style.flexBasis];
466
- style.width = '';
465
+ // not '' - a flex or grid parent may stretch the node
466
+ style.width = 'max-content';
467
467
  style.minWidth = '';
468
468
  style.flexBasis = '';
469
469
  }
@@ -6206,12 +6206,21 @@ class IgxOverlayService {
6206
6206
  delete info.event;
6207
6207
  }
6208
6208
  cleanUp(info) {
6209
+ this.hideDynamicComponent(info);
6209
6210
  this.removeWrapper(info);
6210
6211
  this.restoreHook(info);
6211
6212
  this.destroyComponent(info);
6212
6213
  this.unregisterOverlay(info);
6213
6214
  this.releaseResources(info);
6214
6215
  }
6216
+ /**
6217
+ * Hides a dynamically created component before unwrapping it, as Angular may remove its host after `destroyComponent`.
6218
+ */
6219
+ hideDynamicComponent(info) {
6220
+ if (info.componentRef) {
6221
+ info.elementRef.nativeElement.style.display = 'none';
6222
+ }
6223
+ }
6215
6224
  /**
6216
6225
  * Reverses the wrapper insertion performed by `insertWrapper`, restoring the element to its original DOM position.
6217
6226
  */