From ce83e305e87229b9093c39b22add07a8dda5a5c8 Mon Sep 17 00:00:00 2001 From: Martin Dragnev Date: Wed, 19 Mar 2025 15:56:55 +0200 Subject: [PATCH] fix(for-of): If there is no sizeCache when updating, assign default item size --- .../src/lib/directives/for-of/for_of.directive.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts b/projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts index 672d2fa9c66..6f79dc8751b 100644 --- a/projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts +++ b/projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts @@ -1800,7 +1800,7 @@ export class IgxGridForOfDirective extends IgxForOfDirec changes.forEachItem((item) => { if (item.previousIndex !== null && (numRemovedItems < 2 || !identityChanges.length || identityChanges[item.currentIndex]) - && this.igxForScrollOrientation !== "horizontal") { + && this.igxForScrollOrientation !== "horizontal" && this.individualSizeCache.length > 0) { // Reuse cache on those who have previousIndex. // When there are more than one removed items currently the changes are not readable so ones with identity change // should be racalculated.