@colijnit/sharedcomponents 1.0.53 → 1.0.54

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.
@@ -4332,6 +4332,7 @@
4332
4332
  this.iconCacheService = iconCacheService;
4333
4333
  this.icons = exports["ɵbr"];
4334
4334
  this.showValue = true;
4335
+ this.resetModelOnInit = true;
4335
4336
  this.emitModelChangeOnEnter = true;
4336
4337
  this.modelChange = new i0.EventEmitter();
4337
4338
  this.internalModelChange = new i0.EventEmitter();
@@ -4360,6 +4361,7 @@
4360
4361
  [KeyboardCode.NumpadDecimal, "."],
4361
4362
  [KeyboardCode.Period, "."]
4362
4363
  ]);
4364
+ this._init = true;
4363
4365
  this.isNegative = false;
4364
4366
  this._model = 0;
4365
4367
  this._internalModel = "0";
@@ -4428,6 +4430,10 @@
4428
4430
  this.enterClick.emit();
4429
4431
  };
4430
4432
  KeyPadComponent.prototype._updateModel = function (value) {
4433
+ if (this.resetModelOnInit && this._init) {
4434
+ this._internalModel = "0";
4435
+ this._init = false;
4436
+ }
4431
4437
  if (value === undefined || value === null ||
4432
4438
  (value === '.' && this.internalModel.indexOf('.') > -1) ||
4433
4439
  this.internalModel.length >= this._maxCharacters) {
@@ -4492,6 +4498,7 @@
4492
4498
  KeyPadComponent.propDecorators = {
4493
4499
  model: [{ type: i0.Input }],
4494
4500
  showValue: [{ type: i0.Input }],
4501
+ resetModelOnInit: [{ type: i0.Input }],
4495
4502
  emitModelChangeOnEnter: [{ type: i0.Input }],
4496
4503
  modelChange: [{ type: i0.Output }],
4497
4504
  internalModelChange: [{ type: i0.Output }],