mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(ios): proper cleanup of reused listview cell content (#10603)
This commit is contained in:
committed by
GitHub
parent
499fe8dc82
commit
dca77183d1
@@ -460,8 +460,9 @@ export class ListView extends ListViewBase {
|
|||||||
if (!cell.view) {
|
if (!cell.view) {
|
||||||
cell.owner = new WeakRef(view);
|
cell.owner = new WeakRef(view);
|
||||||
} else if (cell.view !== 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);
|
this._removeContainer(cell);
|
||||||
(<UIView>cell.view?.nativeViewProtected)?.removeFromSuperview();
|
|
||||||
cell.owner = new WeakRef(view);
|
cell.owner = new WeakRef(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user