mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-14 18:12:09 +08:00
fix(ios): listview measurement (#10740)
This commit is contained in:

committed by
GitHub

parent
93e6eb9687
commit
8393df1455
@ -392,9 +392,12 @@ export class ListView extends ListViewBase {
|
||||
}
|
||||
|
||||
public measure(widthMeasureSpec: number, heightMeasureSpec: number): void {
|
||||
const changed: boolean = this._currentWidthMeasureSpec !== widthMeasureSpec || this._currentHeightMeasureSpec !== heightMeasureSpec;
|
||||
|
||||
this.widthMeasureSpec = widthMeasureSpec;
|
||||
const changed = this._setCurrentMeasureSpecs(widthMeasureSpec, heightMeasureSpec);
|
||||
super.measure(widthMeasureSpec, heightMeasureSpec);
|
||||
|
||||
// Reload native view cells only in the case of size change
|
||||
if (changed) {
|
||||
this.nativeViewProtected.reloadData();
|
||||
}
|
||||
|
Reference in New Issue
Block a user