fix(ios): proper cleanup of reused listview cell content (#10603)

This commit is contained in:
Dimitris-Rafail Katsampas
2024-08-08 08:50:48 +03:00
committed by GitHub
parent 499fe8dc82
commit dca77183d1

View File

@@ -460,8 +460,9 @@ export class ListView extends ListViewBase {
if (!cell.view) {
cell.owner = new WeakRef(view);
} else if (cell.view !== view) {
// Remove view from super view now as nativeViewProtected will be null afterwards
(<UIView>cell.view.nativeViewProtected)?.removeFromSuperview();
this._removeContainer(cell);
(<UIView>cell.view?.nativeViewProtected)?.removeFromSuperview();
cell.owner = new WeakRef(view);
}