Skip to content

Commit 16ffc61

Browse files
committed
refactor: declare inputMode as property in big decimal field
Set inputMode via a Polymer property declaration instead of the ready() override that set the attribute imperatively on the input element.
1 parent a29d092 commit 16ffc61

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

vaadin-text-field-flow-parent/vaadin-text-field-flow/src/main/resources/META-INF/frontend/vaadin-big-decimal-field.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ class BigDecimalField extends TextField {
4848
value: '.',
4949
sync: true,
5050
observer: '__decimalSeparatorChanged'
51+
},
52+
53+
inputMode: {
54+
type: String,
55+
value: 'decimal'
5156
}
5257
};
5358
}
5459

55-
ready() {
56-
super.ready();
57-
this.inputElement.setAttribute('inputmode', 'decimal');
58-
}
59-
6060
__decimalSeparatorChanged(separator, oldSeparator) {
6161
this.allowedCharPattern = '[-+\\d' + separator + ']';
6262

0 commit comments

Comments
 (0)