ngx-render-material-forms 1.2.4 → 1.2.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 +9 -5
- package/fesm2015/ngx-render-material-forms.js +9 -4
- package/fesm2015/ngx-render-material-forms.mjs.map +1 -1
- package/fesm2020/ngx-render-material-forms.js +8 -4
- package/fesm2020/ngx-render-material-forms.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -2532,8 +2532,8 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2532
2532
|
this._onDestroy = new Subject();
|
|
2533
2533
|
// Variables to track pagination
|
|
2534
2534
|
this.pageNumber = 1;
|
|
2535
|
-
this.pageSize =
|
|
2536
|
-
this.totalPages =
|
|
2535
|
+
this.pageSize = 20;
|
|
2536
|
+
this.totalPages = 0;
|
|
2537
2537
|
this.searchQuery = '';
|
|
2538
2538
|
this.holy = '';
|
|
2539
2539
|
this.grail = '';
|
|
@@ -2588,10 +2588,12 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2588
2588
|
if (this.instance.component.key.toLowerCase() === 'vendorproductid') {
|
|
2589
2589
|
const scrollElement = event.target;
|
|
2590
2590
|
const trackHeight = scrollElement.scrollHeight - scrollElement.offsetHeight;
|
|
2591
|
+
console.log('productsloadingFlagScroll=>', this.productsloadingFlag);
|
|
2591
2592
|
if (this.productsloadingFlag && Math.floor(scrollElement.scrollTop / trackHeight * 100) > 50) {
|
|
2592
2593
|
this.productsloadingFlag = false;
|
|
2593
|
-
if (this.pageNumber < this.totalPages
|
|
2594
|
+
if (this.pageNumber < this.totalPages) {
|
|
2594
2595
|
this.pageNumber = this.pageNumber + 1;
|
|
2596
|
+
console.log('this.pageNumber', this.pageNumber, this.totalPages);
|
|
2595
2597
|
this.loadData(this.pageNumber, this.pageSize, this.searchQuery);
|
|
2596
2598
|
}
|
|
2597
2599
|
}
|
|
@@ -2639,7 +2641,7 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2639
2641
|
const baseApiUrl = baseUrlMapping[hostname] || null;
|
|
2640
2642
|
this.http.get(`${baseApiUrl}/api/VendorFormBuilder/GetVendorProducts?vendorId=${envendorId}&pageNumber=${enpageNumber}&pageSize=${enpageSize}&search=${ensearchQuery}&onlyActive=${enactive}&includeDescription=${endescription}`, { headers }).subscribe(response => {
|
|
2641
2643
|
if (response && response.code === 200) {
|
|
2642
|
-
this.totalPages = response
|
|
2644
|
+
this.totalPages = response?.data?.totalPages;
|
|
2643
2645
|
if (this.instance.component.key.toLowerCase() === 'vendorproductid') {
|
|
2644
2646
|
const transformedData = this.transformResponseData(response.data.dataSource);
|
|
2645
2647
|
// Process the transformed data
|
|
@@ -2652,6 +2654,8 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2652
2654
|
setTimeout(() => {
|
|
2653
2655
|
this.productsloadingFlag = true;
|
|
2654
2656
|
}, 1000);
|
|
2657
|
+
console.log('productsloadingFlag', this.productsloadingFlag);
|
|
2658
|
+
console.log('totalPage=>', this.totalPages);
|
|
2655
2659
|
}
|
|
2656
2660
|
});
|
|
2657
2661
|
}
|