Skip to content

Commit

Permalink
fix(*): fix issue when data is either remote or just late because of …
Browse files Browse the repository at this point in the history
…width: auto
  • Loading branch information
mddragnev committed Oct 18, 2024
1 parent 5839211 commit 494a711
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1093,9 +1093,8 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
* @hidden @internal
*/
public ngOnChanges(changes: SimpleChanges) {
if (changes.superCompactMode && !this._init) {
if (changes.superCompactMode && !changes.superCompactMode.isFirstChange()) {
this._shouldUpdateSizes = true;
//check if sizes are changed
resizeObservable(this.verticalScrollContainer.displayContainer).pipe(take(1), takeUntil(this.destroy$)).subscribe(() => this.resizeNotify.next());
}
}
Expand Down Expand Up @@ -1134,6 +1133,9 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
}

protected override get shouldResize(): boolean {
if (!this.dataRowList.first?.cells || this.dataRowList.first.cells.length === 0) {
return false;
}
const isSizePropChanged = super.shouldResize;
if (isSizePropChanged || this._shouldUpdateSizes) {
this._shouldUpdateSizes = false;
Expand Down

0 comments on commit 494a711

Please sign in to comment.