ngx-render-material-forms 1.8.7 → 1.8.8

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.
@@ -4043,7 +4043,8 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
4043
4043
  if (!this.showSubcategory) {
4044
4044
  this.removeColumn('subCategory');
4045
4045
  }
4046
- localStorage.setItem(`selectedProducts-${this.dealId}`, JSON.stringify(response.data.items.selectedProducts));
4046
+ const selectedProductsCopy = JSON.parse(JSON.stringify(response.data.items.selectedProducts));
4047
+ localStorage.setItem(`selectedProducts-${this.dealId}`, JSON.stringify(this.addPriceProperty(selectedProductsCopy)));
4047
4048
  this.dataSourceNew = response.data.items.selectedProducts;
4048
4049
  this.showDataGrid = true;
4049
4050
  this.instance.component.defaultValue = response.data.items.selectedProducts;
@@ -4059,6 +4060,14 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
4059
4060
  this.dataSource.data = [...this.dataSource.data];
4060
4061
  }
4061
4062
  }
4063
+ addPriceProperty(selectedProducts) {
4064
+ return selectedProducts.map(products => {
4065
+ return {
4066
+ ...products,
4067
+ priceDisable: true
4068
+ };
4069
+ });
4070
+ }
4062
4071
  checkRowsNumber() {
4063
4072
  while (this.instance.rows.length < this.dataSource.data.length) {
4064
4073
  this.instance.addRow();