ngx-render-material-forms 1.5.5 → 1.5.6
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.
- package/esm2020/lib/components/select/select.component.mjs +13 -13
- package/fesm2015/ngx-render-material-forms.js +12 -12
- package/fesm2015/ngx-render-material-forms.mjs.map +1 -1
- package/fesm2020/ngx-render-material-forms.js +12 -12
- package/fesm2020/ngx-render-material-forms.mjs.map +1 -1
- package/lib/components/select/select.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2562,6 +2562,7 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2562
2562
|
this.productsloadingFlag = false;
|
|
2563
2563
|
this.searching = false;
|
|
2564
2564
|
this.productList = [];
|
|
2565
|
+
this.selectedValue = '';
|
|
2565
2566
|
// Variable to hold the reference to the current panel element
|
|
2566
2567
|
this.currentPanelElement = null;
|
|
2567
2568
|
this.openCounter = 1;
|
|
@@ -2706,16 +2707,14 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2706
2707
|
this.productsloadingFlag = true;
|
|
2707
2708
|
setTimeout(() => {
|
|
2708
2709
|
const ele = this.selectElem?.panel?.nativeElement;
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
// console.log('Panel element is not available yet.');
|
|
2718
|
-
// }
|
|
2710
|
+
if (ele) {
|
|
2711
|
+
const trackHeight = ele.scrollHeight - ele.offsetHeight;
|
|
2712
|
+
const middlePosition = trackHeight / 2 - 50;
|
|
2713
|
+
ele.scrollTo({ top: middlePosition, behavior: 'auto' });
|
|
2714
|
+
}
|
|
2715
|
+
else {
|
|
2716
|
+
console.log('Panel element is not available yet.');
|
|
2717
|
+
}
|
|
2719
2718
|
}, 250);
|
|
2720
2719
|
}
|
|
2721
2720
|
}
|
|
@@ -2767,6 +2766,7 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2767
2766
|
this.searchQuery = '';
|
|
2768
2767
|
this.searching = false;
|
|
2769
2768
|
this.productList = [];
|
|
2769
|
+
this.selectedValue = '';
|
|
2770
2770
|
this.loadData(this.pageNumber, this.pageSize, this.searchQuery);
|
|
2771
2771
|
}
|
|
2772
2772
|
}
|
|
@@ -2784,8 +2784,8 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2784
2784
|
else {
|
|
2785
2785
|
this.removePanelScrollEvent();
|
|
2786
2786
|
this.searching = false;
|
|
2787
|
-
|
|
2788
|
-
if (selectedValue?.toString().length ==
|
|
2787
|
+
this.selectedValue = this.getValue();
|
|
2788
|
+
if (this.selectedValue?.toString().length == 0) {
|
|
2789
2789
|
this.productList = [];
|
|
2790
2790
|
this.pageNumber = 1;
|
|
2791
2791
|
this.pageSize = 20;
|