@@ -1672,7 +1672,9 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
16721672 }
16731673
16741674 public override ngOnInit ( ) {
1675- this . syncService . setMaster ( this ) ;
1675+ if ( ! this . igxGridForOfUniqueSizeCache ) {
1676+ this . syncService . setMaster ( this ) ;
1677+ }
16761678 super . ngOnInit ( ) ;
16771679 this . removeScrollEventListeners ( ) ;
16781680 const destructor = takeUntil < any > ( this . destroy$ ) ;
@@ -1685,7 +1687,9 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
16851687
16861688 public override ngOnChanges ( changes : SimpleChanges ) {
16871689 const forOf = 'igxGridForOf' ;
1688- this . syncService . setMaster ( this ) ;
1690+ if ( ! this . igxGridForOfUniqueSizeCache ) {
1691+ this . syncService . setMaster ( this ) ;
1692+ }
16891693 if ( forOf in changes ) {
16901694 const value = changes [ forOf ] . currentValue ;
16911695 if ( ! this . _differ && value ) {
@@ -1697,9 +1701,9 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
16971701 NgFor only supports binding to Iterables such as Arrays.` ) ;
16981702 }
16991703 }
1700- if ( this . igxForScrollOrientation === 'horizontal' ) {
1704+ if ( this . igxForScrollOrientation === 'horizontal' && ! this . igxGridForOfUniqueSizeCache ) {
17011705 // in case collection has changes, reset sync service
1702- this . syncService . setMaster ( this , this . igxGridForOfUniqueSizeCache ) ;
1706+ this . syncService . setMaster ( this ) ;
17031707 }
17041708 }
17051709 const defaultItemSize = 'igxForItemSize' ;
@@ -1742,10 +1746,13 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
17421746 (e.g. because of filtering); if all columns are hidden, rows are
17431747 still rendered empty, so we should not reset master */
17441748 if ( ! this . igxForOf . length &&
1745- this . igxForScrollOrientation === 'vertical' ) {
1749+ this . igxForScrollOrientation === 'vertical' &&
1750+ ! this . igxGridForOfUniqueSizeCache ) {
17461751 this . syncService . resetMaster ( ) ;
17471752 }
1748- this . syncService . setMaster ( this ) ;
1753+ if ( ! this . igxGridForOfUniqueSizeCache ) {
1754+ this . syncService . setMaster ( this ) ;
1755+ }
17491756 this . igxForContainerSize = args . containerSize ;
17501757 const sizeDiff = this . _updateSizeCache ( changes ) ;
17511758 this . _applyChanges ( ) ;
@@ -1817,7 +1824,7 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
18171824 }
18181825
18191826 protected override initSizesCache ( items : U ) : number {
1820- if ( ! this . syncService . isMaster ( this ) && this . igxForScrollOrientation === 'horizontal' ) {
1827+ if ( ! this . igxGridForOfUniqueSizeCache && ! this . syncService . isMaster ( this ) && this . igxForScrollOrientation === 'horizontal' ) {
18211828 const masterSizesCache = this . syncService . sizesCache ( this . igxForScrollOrientation ) ;
18221829 return masterSizesCache [ masterSizesCache . length - 1 ] ;
18231830 }
@@ -1957,7 +1964,7 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
19571964 */
19581965 protected override _calcMaxChunkSize ( ) : number {
19591966 if ( this . igxForScrollOrientation === 'horizontal' ) {
1960- if ( this . syncService . isMaster ( this ) ) {
1967+ if ( this . igxGridForOfUniqueSizeCache || this . syncService . isMaster ( this ) ) {
19611968 return super . _calcMaxChunkSize ( ) ;
19621969 }
19631970 return this . syncService . chunkSize ( this . igxForScrollOrientation ) ;
0 commit comments