@sumaris-net/ngx-components 2.5.2-rc2 → 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.
- package/esm2020/src/app/core/table/async-table.class.mjs +15 -23
- package/fesm2015/sumaris-net.ngx-components.mjs +14 -22
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +14 -22
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -30358,28 +30358,20 @@ class AppAsyncTable {
|
|
|
30358
30358
|
this.onConfirmEditCreateRow.next(row);
|
|
30359
30359
|
return true; // Continue
|
|
30360
30360
|
}
|
|
30361
|
-
|
|
30362
|
-
|
|
30363
|
-
|
|
30364
|
-
|
|
30365
|
-
|
|
30366
|
-
|
|
30367
|
-
|
|
30368
|
-
|
|
30369
|
-
|
|
30370
|
-
|
|
30371
|
-
|
|
30372
|
-
|
|
30373
|
-
|
|
30374
|
-
|
|
30375
|
-
// row.validator.markAllAsTouched();
|
|
30376
|
-
//
|
|
30377
|
-
// // Compute row error, and propagate to table's error
|
|
30378
|
-
// if (this.propagateRowError) {
|
|
30379
|
-
// const error = this.getRowError(row);
|
|
30380
|
-
// this.setError(error);
|
|
30381
|
-
// }
|
|
30382
|
-
// }
|
|
30361
|
+
if (row.validator) {
|
|
30362
|
+
// NOT confirmed = row has error
|
|
30363
|
+
if (this.debug) {
|
|
30364
|
+
console.warn('[table] Cannot confirm row, because invalid');
|
|
30365
|
+
AppFormUtils.logFormErrors(row.validator, '[table] ');
|
|
30366
|
+
}
|
|
30367
|
+
// fix: mark all controls as touched to show errors
|
|
30368
|
+
row.validator.markAllAsTouched();
|
|
30369
|
+
// Compute row error, and propagate to table's error
|
|
30370
|
+
if (this.propagateRowError) {
|
|
30371
|
+
const error = this.getRowError(row);
|
|
30372
|
+
this.setError(error);
|
|
30373
|
+
}
|
|
30374
|
+
}
|
|
30383
30375
|
// Not confirmed
|
|
30384
30376
|
return false;
|
|
30385
30377
|
}
|