igniteui-angular 14.2.30 → 14.2.31
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/grids/grid/grid-validation.service.mjs +19 -3
- package/esm2020/lib/grids/grid/grid.component.mjs +4 -1
- package/esm2020/lib/grids/hierarchical-grid/hierarchical-grid.component.mjs +4 -1
- package/esm2020/lib/grids/tree-grid/tree-grid.component.mjs +4 -1
- package/esm2020/lib/simple-combo/simple-combo.component.mjs +2 -2
- package/fesm2015/igniteui-angular.mjs +28 -3
- package/fesm2015/igniteui-angular.mjs.map +1 -1
- package/fesm2020/igniteui-angular.mjs +28 -3
- package/fesm2020/igniteui-angular.mjs.map +1 -1
- package/lib/grids/grid/grid-validation.service.d.ts +6 -0
- package/package.json +1 -1
|
@@ -38634,7 +38634,7 @@ class IgxSimpleComboComponent extends IgxComboBaseDirective {
|
|
|
38634
38634
|
}
|
|
38635
38635
|
this.registerRemoteEntries(oldSelection, false);
|
|
38636
38636
|
this.registerRemoteEntries(newSelection);
|
|
38637
|
-
return Object.keys(this._remoteSelection).map(e => this._remoteSelection[e])[0];
|
|
38637
|
+
return Object.keys(this._remoteSelection).map(e => this._remoteSelection[e])[0] || '';
|
|
38638
38638
|
}
|
|
38639
38639
|
/** Contains key-value pairs of the selected valueKeys and their resp. displayKeys */
|
|
38640
38640
|
registerRemoteEntries(ids, add = true) {
|
|
@@ -59934,9 +59934,9 @@ class IgxGridValidationService {
|
|
|
59934
59934
|
const value = resolveNestedPath(data || {}, col.field);
|
|
59935
59935
|
const field = this.getFieldKey(col.field);
|
|
59936
59936
|
const control = new FormControl(value, { updateOn: this.grid.validationTrigger });
|
|
59937
|
-
control.setValue(value);
|
|
59938
59937
|
control.addValidators(col.validators);
|
|
59939
59938
|
formGroup.addControl(field, control);
|
|
59939
|
+
control.setValue(value);
|
|
59940
59940
|
}
|
|
59941
59941
|
const args = {
|
|
59942
59942
|
formGroup,
|
|
@@ -60025,12 +60025,28 @@ class IgxGridValidationService {
|
|
|
60025
60025
|
for (const key of keys) {
|
|
60026
60026
|
const colKey = this.getFieldKey(key);
|
|
60027
60027
|
const control = rowGroup?.get(colKey);
|
|
60028
|
-
if (control) {
|
|
60028
|
+
if (control && control.value !== rowData[key]) {
|
|
60029
60029
|
control.setValue(rowData[key], { emitEvent: false });
|
|
60030
60030
|
}
|
|
60031
60031
|
}
|
|
60032
60032
|
this.updateStatus();
|
|
60033
60033
|
}
|
|
60034
|
+
/**
|
|
60035
|
+
* @hidden
|
|
60036
|
+
* @internal
|
|
60037
|
+
* Update validity based on new data.
|
|
60038
|
+
*/
|
|
60039
|
+
updateAll(newData) {
|
|
60040
|
+
if (!newData || this._validityStates.size === 0)
|
|
60041
|
+
return;
|
|
60042
|
+
for (const rec of newData) {
|
|
60043
|
+
const rowId = rec[this.grid.primaryKey] || rec;
|
|
60044
|
+
if (this.getFormGroup(rowId)) {
|
|
60045
|
+
const recAggregatedData = this.grid.transactions.getAggregatedValue(rowId, true) || rec;
|
|
60046
|
+
this.update(rowId, recAggregatedData);
|
|
60047
|
+
}
|
|
60048
|
+
}
|
|
60049
|
+
}
|
|
60034
60050
|
/** Marks the associated record or field as touched.
|
|
60035
60051
|
* @param key The id of the record that will be marked as touched.
|
|
60036
60052
|
* @param field Optional. The field from the record that will be marked as touched. If not provided all fields will be touched.
|
|
@@ -70158,6 +70174,9 @@ class IgxGridComponent extends IgxGridBaseDirective {
|
|
|
70158
70174
|
set data(value) {
|
|
70159
70175
|
this._data = value || [];
|
|
70160
70176
|
this.summaryService.clearSummaryCache();
|
|
70177
|
+
if (!this._init) {
|
|
70178
|
+
this.validation.updateAll(this._data);
|
|
70179
|
+
}
|
|
70161
70180
|
if (this.shouldGenerate) {
|
|
70162
70181
|
this.setupColumns();
|
|
70163
70182
|
}
|
|
@@ -78997,6 +79016,9 @@ class IgxTreeGridComponent extends IgxGridBaseDirective {
|
|
|
78997
79016
|
set data(value) {
|
|
78998
79017
|
this._data = value || [];
|
|
78999
79018
|
this.summaryService.clearSummaryCache();
|
|
79019
|
+
if (!this._init) {
|
|
79020
|
+
this.validation.updateAll(this._data);
|
|
79021
|
+
}
|
|
79000
79022
|
if (this.shouldGenerate) {
|
|
79001
79023
|
this.setupColumns();
|
|
79002
79024
|
}
|
|
@@ -81583,6 +81605,9 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
|
|
|
81583
81605
|
set data(value) {
|
|
81584
81606
|
this._data = value || [];
|
|
81585
81607
|
this.summaryService.clearSummaryCache();
|
|
81608
|
+
if (!this._init) {
|
|
81609
|
+
this.validation.updateAll(this._data);
|
|
81610
|
+
}
|
|
81586
81611
|
if (this.shouldGenerate) {
|
|
81587
81612
|
this.setupColumns();
|
|
81588
81613
|
this.reflow();
|