Skip to content

Commit b3540a0

Browse files
Merge pull request primefaces#1741 from mselerin/master
Proposed fix for primefaces#1734
2 parents b16e346 + 8b2afb8 commit b3540a0

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

components/inputmask/inputmask.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ export class InputMask implements AfterViewInit,OnDestroy,ControlValueAccessor {
114114
androidChrome: boolean;
115115

116116
focus: boolean;
117-
118-
filled: boolean;
119117

120118
constructor(public el: ElementRef, public domHandler: DomHandler) {}
121119

@@ -189,8 +187,6 @@ export class InputMask implements AfterViewInit,OnDestroy,ControlValueAccessor {
189187
_this.checkVal();
190188
}, 10);
191189
}
192-
193-
this.updateFilledState();
194190
}
195191

196192
registerOnChange(fn: Function): void {
@@ -341,7 +337,6 @@ export class InputMask implements AfterViewInit,OnDestroy,ControlValueAccessor {
341337
this.onModelTouched();
342338
this.checkVal();
343339
this.updateModel(e);
344-
this.updateFilledState();
345340

346341
if (this.input.value != this.focusText) {
347342
let event = document.createEvent('HTMLEvents');
@@ -534,7 +529,6 @@ export class InputMask implements AfterViewInit,OnDestroy,ControlValueAccessor {
534529
} else {
535530
this.caret(pos);
536531
}
537-
this.updateFilledState();
538532
}, 10);
539533
}
540534

@@ -575,10 +569,10 @@ export class InputMask implements AfterViewInit,OnDestroy,ControlValueAccessor {
575569
updateModel(e) {
576570
this.onModelChange(this.unmask ? this.getUnmaskedValue() : e.target.value);
577571
}
578-
579-
updateFilledState() {
580-
this.filled = this.input && this.input.value != '';
581-
}
572+
573+
get filled() {
574+
return this.input && this.input.value != '';
575+
}
582576

583577
ngOnDestroy() {
584578

0 commit comments

Comments
 (0)