Skip to content

Commit

Permalink
fix: input ignores 0 value
Browse files Browse the repository at this point in the history
  • Loading branch information
stumpam committed Apr 6, 2021
1 parent 99ba406 commit 164aec5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libs/ngx-masked-input/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stumpam/ngx-masked-input",
"license": "MIT",
"version": "3.1.5",
"version": "3.1.6",
"description": "Angular Date picker with masked input.",
"homepage": "https://github.com/stumpam/ngx-masked-input",
"author": "Martin Štumpa (https://github.com/stumpam)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class MaskedInputDirective implements ControlValueAccessor {
}

onNumericInput(value: string | number | null) {
if (!value) return;
if (!value && value !== 0) return;

let updated = value.toString();

Expand Down Expand Up @@ -167,6 +167,7 @@ export class MaskedInputDirective implements ControlValueAccessor {
}${updated}`;
}


this.updateValue(updated);
}

Expand Down

0 comments on commit 164aec5

Please sign in to comment.