ngx-render-material-forms 1.6.1 → 1.6.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 +30 -10
- package/fesm2015/ngx-render-material-forms.js +30 -11
- package/fesm2015/ngx-render-material-forms.mjs.map +1 -1
- package/fesm2020/ngx-render-material-forms.js +29 -9
- package/fesm2020/ngx-render-material-forms.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2893,7 +2893,9 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2893
2893
|
// If the object doesn't exist, add it to the array
|
|
2894
2894
|
finalParams.push({ key: 'dataValue', value: value });
|
|
2895
2895
|
}
|
|
2896
|
+
console.log('360=>', apiEndPoint, finalParams);
|
|
2896
2897
|
this.commonService.initializeApiPath(apiEndPoint, finalParams).subscribe(response => {
|
|
2898
|
+
console.log('response361=>', response);
|
|
2897
2899
|
if (response && response.code === 200) {
|
|
2898
2900
|
this.secondDropdownItems = response.data;
|
|
2899
2901
|
this.commonService.setDropdownItems(this.secondDropdownItems);
|
|
@@ -2902,17 +2904,32 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2902
2904
|
}
|
|
2903
2905
|
}
|
|
2904
2906
|
ngAfterViewInit() {
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
const
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2907
|
+
let i = 0;
|
|
2908
|
+
// console.log('this.instance=>', this.instance)
|
|
2909
|
+
// const newProductPickerFlag = this.instance?.component?.attributes;
|
|
2910
|
+
// let checkInvokeFromLibrary = this.checkIsAttributeTrue(newProductPickerFlag, "invokeFromLibrary")
|
|
2911
|
+
// const firstLevel = (this.getVendorRefList(this.instance) && checkInvokeFromLibrary);
|
|
2912
|
+
// if (firstLevel) {
|
|
2913
|
+
// this.selectElem.valueChange.subscribe(res => {
|
|
2914
|
+
// this.commonService.setDropDownFlag(true);
|
|
2915
|
+
// console.log('376=>', res)
|
|
2916
|
+
// this.updateSecondDropdown(res);
|
|
2917
|
+
// });
|
|
2918
|
+
// }
|
|
2914
2919
|
this.selectElem.openedChange.subscribe(async (isOpen) => {
|
|
2915
2920
|
if (isOpen) {
|
|
2921
|
+
console.log('this.instance=>', this.instance);
|
|
2922
|
+
const newProductPickerFlag = this.instance?.component?.attributes;
|
|
2923
|
+
let checkInvokeFromLibrary = this.checkIsAttributeTrue(newProductPickerFlag, "invokeFromLibrary");
|
|
2924
|
+
const firstLevel = (this.getVendorRefList(this.instance) && checkInvokeFromLibrary);
|
|
2925
|
+
if (firstLevel) {
|
|
2926
|
+
this.selectElem.valueChange.subscribe(res => {
|
|
2927
|
+
this.commonService.setDropDownFlag(true);
|
|
2928
|
+
console.log('376=>', res, i);
|
|
2929
|
+
this.updateSecondDropdown(res);
|
|
2930
|
+
i++;
|
|
2931
|
+
});
|
|
2932
|
+
}
|
|
2916
2933
|
if (this.checkVendorRefItems(this.instance) && checkInvokeFromLibrary) {
|
|
2917
2934
|
this.storeDependentItems = [];
|
|
2918
2935
|
this.secondDropdownItems = this.commonService.getDropdownItems();
|
|
@@ -2921,9 +2938,12 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2921
2938
|
this.storeDependentItems.push({ label: renderElement['text'], value: this.commonService.onlyNumbers(renderElement['value']) ? renderElement['value'] + ' ' : renderElement['value'] });
|
|
2922
2939
|
});
|
|
2923
2940
|
}
|
|
2941
|
+
console.log('410=>', this.commonService.getDropDownFlag(), this.instance);
|
|
2924
2942
|
if (!this.commonService.getDropDownFlag()) {
|
|
2925
2943
|
this.storeDependentItems = this.instance.component.data.values;
|
|
2944
|
+
console.log('396=>', this.storeDependentItems);
|
|
2926
2945
|
}
|
|
2946
|
+
console.log('this.storeDependentItems=>', this.storeDependentItems);
|
|
2927
2947
|
this.filteredOptions = Promise.resolve(this.storeDependentItems);
|
|
2928
2948
|
this.selectOptions = Promise.resolve(this.storeDependentItems);
|
|
2929
2949
|
this.selectOptions.then(result => {
|