Skip to content

Commit 4314d3f

Browse files
committed
fix(ios): ensure labels with html measure correctly in list views
1 parent a812fc4 commit 4314d3f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: src/label-common.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export abstract class LabelBase extends TNLabel implements LabelViewDefinition {
7777
}
7878

7979
// TODO: Can we use Label.ios optimization for affectsLayout???
80-
export const htmlProperty = new Property<LabelBase, string>({ name: 'html', defaultValue: null, affectsLayout: true });
80+
export const htmlProperty = new Property<LabelBase, string>({ name: 'html', defaultValue: null, affectsLayout: global.isAndroid });
8181
htmlProperty.register(LabelBase);
8282

8383
export const maxLinesProperty = new CssProperty<Style, number>({

Diff for: src/label.ios.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -447,11 +447,11 @@ export class Label extends LabelBase {
447447
this.attributedString = result;
448448

449449

450-
this._requestLayoutOnTextChanged();
451450
}
452451
if (this.nativeViewProtected) {
453452
this.nativeViewProtected.attributedText = this.attributedString;
454453
}
454+
this._requestLayoutOnTextChanged();
455455
}
456456
[colorProperty.setNative](value: Color | UIColor) {
457457
const color = value instanceof Color ? value.ios : value;

0 commit comments

Comments
 (0)