Skip to content

Commit d777965

Browse files
authored
fix(for-of): If there is no sizeCache when updating, assign default item size (#15549)
1 parent be849d3 commit d777965

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1800,7 +1800,7 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
18001800
changes.forEachItem((item) => {
18011801
if (item.previousIndex !== null &&
18021802
(numRemovedItems < 2 || !identityChanges.length || identityChanges[item.currentIndex])
1803-
&& this.igxForScrollOrientation !== "horizontal") {
1803+
&& this.igxForScrollOrientation !== "horizontal" && this.individualSizeCache.length > 0) {
18041804
// Reuse cache on those who have previousIndex.
18051805
// When there are more than one removed items currently the changes are not readable so ones with identity change
18061806
// should be racalculated.

0 commit comments

Comments
 (0)