Skip to content

Commit

Permalink
fix(Input): sanitize input value inside of value setter before value …
Browse files Browse the repository at this point in the history
…emits
  • Loading branch information
deanterm authored and benjamincharity committed Feb 20, 2020
1 parent 1c0f02d commit 75c8fdf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion terminus-ui/input/src/input.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,9 @@ export class TsInputComponent implements

// istanbul ignore else
if (v !== this.value) {
const sanitizedValue = this.maskSanitizeValue && this.currentMask ? this.cleanValue(v, this.currentMask.unmaskRegex) : v;
this.inputValueAccessor.value = v;
this.onChangeCallback(v);
this.onChangeCallback(sanitizedValue);
this.stateChanges.next();
}

Expand Down

0 comments on commit 75c8fdf

Please sign in to comment.