ngx-render-material-forms 1.2.2 → 1.2.3
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 +16 -10
- package/fesm2015/ngx-render-material-forms.js +15 -9
- package/fesm2015/ngx-render-material-forms.mjs.map +1 -1
- package/fesm2020/ngx-render-material-forms.js +15 -9
- package/fesm2020/ngx-render-material-forms.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2635,13 +2635,15 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2635
2635
|
this.http.get(`${baseApiUrl}/api/VendorFormBuilder/GetVendorProducts?vendorId=${envendorId}&pageNumber=${enpageNumber}&pageSize=${enpageSize}&search=${ensearchQuery}&onlyActive=${enactive}&includeDescription=${endescription}`, { headers }).subscribe(response => {
|
|
2636
2636
|
if (response && response.code === 200) {
|
|
2637
2637
|
this.totalPages = response.data.dataSource;
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2638
|
+
if (this.instance.component.key.toLowerCase() === 'vendorproductid') {
|
|
2639
|
+
const transformedData = this.transformResponseData(response.data.dataSource);
|
|
2640
|
+
// Process the transformed data
|
|
2641
|
+
this.filteredOptions = Promise.resolve(transformedData.map(item => ({
|
|
2642
|
+
label: item.label,
|
|
2643
|
+
value: item.value,
|
|
2644
|
+
date: item.date
|
|
2645
|
+
})));
|
|
2646
|
+
}
|
|
2645
2647
|
setTimeout(() => {
|
|
2646
2648
|
this.productsloadingFlag = true;
|
|
2647
2649
|
}, 1000);
|
|
@@ -2686,14 +2688,18 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2686
2688
|
}
|
|
2687
2689
|
onClearAll() {
|
|
2688
2690
|
if (this.searchFlag) {
|
|
2689
|
-
this.
|
|
2691
|
+
if (this.instance.component.key.toLowerCase() === 'vendorproductid') {
|
|
2692
|
+
this.loadData(1, 20, '');
|
|
2693
|
+
}
|
|
2690
2694
|
}
|
|
2691
2695
|
}
|
|
2692
2696
|
ngAfterViewInit() {
|
|
2693
2697
|
this.selectElem.openedChange.subscribe((isOpen) => {
|
|
2694
2698
|
if (isOpen) {
|
|
2695
2699
|
this.searchFlag = false;
|
|
2696
|
-
this.
|
|
2700
|
+
if (this.instance.component.key.toLowerCase() === 'vendorproductid') {
|
|
2701
|
+
this.loadData(1, 20, '');
|
|
2702
|
+
}
|
|
2697
2703
|
}
|
|
2698
2704
|
else {
|
|
2699
2705
|
this.searchFlag = false;
|