ngx-render-material-forms 1.5.3 → 1.5.5

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.
@@ -663,8 +663,15 @@ class MaterialCurrencyComponent extends MaterialNumberComponent {
663
663
  this.inputType = 'text';
664
664
  }
665
665
  onChange() {
666
- const newValue = _.isNil(this.getValue()) ? '' : this.getValue();
667
- this.instance.updateValue(newValue, { modified: true });
666
+ let newValue;
667
+ newValue = _.isNil(this.getValue()) ? '' : this.getValue();
668
+ if (!(Number.isNaN(newValue))) {
669
+ this.instance.updateValue(newValue, { modified: true });
670
+ }
671
+ else {
672
+ newValue = '';
673
+ this.instance.updateValue(newValue, { modified: true });
674
+ }
668
675
  }
669
676
  }
670
677
  MaterialCurrencyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialCurrencyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
@@ -2699,14 +2706,16 @@ class MaterialSelectComponent extends MaterialComponent {
2699
2706
  this.productsloadingFlag = true;
2700
2707
  setTimeout(() => {
2701
2708
  const ele = this.selectElem?.panel?.nativeElement;
2702
- if (ele) {
2703
- const trackHeight = ele.scrollHeight - ele.offsetHeight;
2704
- const middlePosition = trackHeight / 2 - 50;
2705
- ele.scrollTo({ top: middlePosition, behavior: 'auto' });
2706
- }
2707
- else {
2708
- console.log('Panel element is not available yet.');
2709
- }
2709
+ const trackHeight = ele.scrollHeight - ele.offsetHeight;
2710
+ const middlePosition = trackHeight / 2 - 50;
2711
+ ele.scrollTo({ top: middlePosition, behavior: 'auto' });
2712
+ // if (ele) {
2713
+ // const trackHeight = ele.scrollHeight - ele.offsetHeight
2714
+ // const middlePosition = trackHeight / 2 - 50;
2715
+ // ele.scrollTo({ top: middlePosition, behavior: 'auto' });
2716
+ // } else {
2717
+ // console.log('Panel element is not available yet.');
2718
+ // }
2710
2719
  }, 250);
2711
2720
  }
2712
2721
  }