Skip to content

Commit 26726c7

Browse files
MKirovaMayaKirova
authored andcommitted
chore(*): Adding handling for scenario where we are auto-sizing and the data changes has resulted in the vertical scrolbar hiding/showing, which required widths of grid/columns to be re-calculated fully.
1 parent f5dc91d commit 26726c7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3013,10 +3013,15 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
30133013
});
30143014

30153015
this.verticalScrollContainer.onDataChanging.pipe(destructor, filter(() => !this._init)).subscribe(($event) => {
3016-
const shouldRecalcSize = this.isPercentHeight && ( !this.calcHeight || this.calcHeight === this.getDataBasedBodyHeight());
3016+
const shouldRecalcSize = this.isPercentHeight &&
3017+
( !this.calcHeight || this.calcHeight === this.getDataBasedBodyHeight() ||
3018+
this.calcHeight === this.renderedRowHeight * this._defaultTargetRecordNumber);
30173019
if (shouldRecalcSize) {
30183020
this.calculateGridHeight();
30193021
$event.containerSize = this.calcHeight;
3022+
// called to recalc all widths that may have changes as a result of
3023+
// the vert. scrollbar showing/hiding
3024+
this.notifyChanges(true);
30203025
}
30213026
this.evaluateLoadingState();
30223027
});

0 commit comments

Comments
 (0)