mn-angular-lib 0.0.91 → 0.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1123,6 +1123,13 @@ class MnInputField {
|
|
|
1123
1123
|
// Apply mask if available
|
|
1124
1124
|
if (this.props.mask && typeof this.adapter.applyMask === 'function') {
|
|
1125
1125
|
finalValue = this.adapter.applyMask(raw, this.props.mask);
|
|
1126
|
+
// Force-update the DOM input when the mask stripped characters,
|
|
1127
|
+
// because Angular won't re-render if this.value hasn't changed.
|
|
1128
|
+
if (finalValue !== raw) {
|
|
1129
|
+
const input = this.el.nativeElement.querySelector('input');
|
|
1130
|
+
if (input)
|
|
1131
|
+
input.value = finalValue;
|
|
1132
|
+
}
|
|
1126
1133
|
}
|
|
1127
1134
|
this.value = finalValue;
|
|
1128
1135
|
this.onChange(this.adapter.parse(finalValue));
|