@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
|
@@ -31030,28 +31030,20 @@ class AppAsyncTable {
|
|
|
31030
31030
|
this.onConfirmEditCreateRow.next(row);
|
|
31031
31031
|
return true; // Continue
|
|
31032
31032
|
}
|
|
31033
|
-
|
|
31034
|
-
|
|
31035
|
-
|
|
31036
|
-
|
|
31037
|
-
|
|
31038
|
-
|
|
31039
|
-
|
|
31040
|
-
|
|
31041
|
-
|
|
31042
|
-
|
|
31043
|
-
|
|
31044
|
-
|
|
31045
|
-
|
|
31046
|
-
|
|
31047
|
-
// row.validator.markAllAsTouched();
|
|
31048
|
-
//
|
|
31049
|
-
// // Compute row error, and propagate to table's error
|
|
31050
|
-
// if (this.propagateRowError) {
|
|
31051
|
-
// const error = this.getRowError(row);
|
|
31052
|
-
// this.setError(error);
|
|
31053
|
-
// }
|
|
31054
|
-
// }
|
|
31033
|
+
if (row.validator) {
|
|
31034
|
+
// NOT confirmed = row has error
|
|
31035
|
+
if (this.debug) {
|
|
31036
|
+
console.warn('[table] Cannot confirm row, because invalid');
|
|
31037
|
+
AppFormUtils.logFormErrors(row.validator, '[table] ');
|
|
31038
|
+
}
|
|
31039
|
+
// fix: mark all controls as touched to show errors
|
|
31040
|
+
row.validator.markAllAsTouched();
|
|
31041
|
+
// Compute row error, and propagate to table's error
|
|
31042
|
+
if (this.propagateRowError) {
|
|
31043
|
+
const error = this.getRowError(row);
|
|
31044
|
+
this.setError(error);
|
|
31045
|
+
}
|
|
31046
|
+
}
|
|
31055
31047
|
// Not confirmed
|
|
31056
31048
|
return false;
|
|
31057
31049
|
});
|