Skip to content

Commit 6737df6

Browse files
committed
fix(ios): allow layout change within a cell.
1 parent 3458c63 commit 6737df6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/collectionview/collectionview.ios.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,12 @@ export class CollectionView extends CollectionViewBase {
628628
this._addView(view);
629629
const innerView = NSCellView.new() as NSCellView;
630630
innerView.view = new WeakRef(view);
631-
// view['performLayout'] = ()=>{};
631+
// for a cell to update correctly on cell layout change we need
632+
// to do it ourself instead of "propagating it"
633+
view['performLayout'] = () => {
634+
this.measureCell(cell, view, indexPath);
635+
this.layoutCell(indexPath.row, cell, view);
636+
};
632637
innerView.addSubview(view.nativeViewProtected);
633638
cell.contentView.addSubview(innerView);
634639
}

0 commit comments

Comments
 (0)