Skip to content

Commit c31bab1

Browse files
authored
fix(ios): textfield resizing (auto width) on text change (NativeScript#9176)
1 parent e002d72 commit c31bab1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/core/ui/text-field/index.ios.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,10 @@ export class TextField extends TextFieldBase {
217217
if (this.formattedText) {
218218
_updateCharactersInRangeReplacementString(this.formattedText, range.location, range.length, replacementString);
219219
}
220-
220+
if (this.width === 'auto') {
221+
// if the textfield is in auto size we need to request a layout to take the new text width into account
222+
this.requestLayout();
223+
}
221224
this.firstEdit = false;
222225

223226
return true;

0 commit comments

Comments
 (0)