ngx-render-material-forms 2.5.1 → 2.5.2

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.
@@ -2769,8 +2769,12 @@ class CommonService {
2769
2769
  }
2770
2770
  /*Funtion to check if property is matched with given attributes in formBuilder or not */
2771
2771
  checkIsAttributeTrue(newProductPickerFlag, attributeName) {
2772
- return newProductPickerFlag && Object.keys(newProductPickerFlag).some(key => key.toLocaleLowerCase() === attributeName.toLowerCase() &&
2773
- newProductPickerFlag[key].toLowerCase() === "true");
2772
+ // return newProductPickerFlag && Object.keys(newProductPickerFlag).some(key =>
2773
+ // key.toLocaleLowerCase() === attributeName.toLowerCase() &&
2774
+ // newProductPickerFlag[key].toLowerCase() === "true"
2775
+ // );
2776
+ return newProductPickerFlag && Object.keys(newProductPickerFlag).some(key => key.trim().toLowerCase() === attributeName.trim().toLowerCase() &&
2777
+ String(newProductPickerFlag[key]).trim().toLowerCase() === "true");
2774
2778
  }
2775
2779
  getglobedata() {
2776
2780
  const hostMappings = {
@@ -3091,6 +3095,8 @@ class MaterialSelectComponent extends MaterialComponent {
3091
3095
  // If the object doesn't exist, add it to the array
3092
3096
  finalParams.push({ key: 'dataValue', value: value });
3093
3097
  }
3098
+ this.secondDropdownItems = [];
3099
+ this.commonService.setDropdownItems(this.secondDropdownItems);
3094
3100
  this.commonService.initializeApiPath(apiEndPoint, finalParams).subscribe(response => {
3095
3101
  if (response && response.code === 200) {
3096
3102
  this.secondDropdownItems = response.data;
@@ -3223,6 +3229,7 @@ class MaterialSelectComponent extends MaterialComponent {
3223
3229
  const dataUrl = instance.component['data']?.url;
3224
3230
  const isSelectValuesValid = selectValues != null && selectValues !== '' && selectValues !== undefined;
3225
3231
  const isDataUrlInvalid = dataUrl == null || dataUrl === '' || dataUrl === undefined;
3232
+ instance.component.defaultValue = "";
3226
3233
  return isSelectValuesValid && isDataUrlInvalid;
3227
3234
  }
3228
3235
  getVendorRefList(instance) {