@sumaris-net/ngx-components 1.23.0-rc6 → 1.23.0
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/bundles/sumaris-net.ngx-components.umd.js +10 -7
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/table/table.class.js +10 -6
- package/fesm2015/sumaris-net.ngx-components.js +9 -5
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/table/table.class.d.ts +1 -0
|
@@ -23001,11 +23001,12 @@ class AppTable {
|
|
|
23001
23001
|
return this._paginator || this.childPaginator;
|
|
23002
23002
|
}
|
|
23003
23003
|
ngOnInit() {
|
|
23004
|
+
var _a;
|
|
23004
23005
|
if (this._initialized)
|
|
23005
23006
|
return; // Init only once
|
|
23006
23007
|
this._initialized = true;
|
|
23007
23008
|
// Set defaults
|
|
23008
|
-
this.readOnly = toBoolean(this.readOnly, false); // read/write by default
|
|
23009
|
+
this.readOnly = toBoolean(this.readOnly, ((_a = this.dataSource) === null || _a === void 0 ? void 0 : _a.config.readOnly) || false); // read/write by default
|
|
23009
23010
|
this.inlineEdition = !this.readOnly && toBoolean(this.inlineEdition, false); // force to false when readonly
|
|
23010
23011
|
this.saveBeforeDelete = toBoolean(this.saveBeforeDelete, !this.readOnly); // force to false when readonly
|
|
23011
23012
|
this.saveBeforeSort = toBoolean(this.saveBeforeSort, !this.readOnly); // force to false when readonly
|
|
@@ -24003,20 +24004,23 @@ class AppTable {
|
|
|
24003
24004
|
}
|
|
24004
24005
|
addRowToTable(insertAt, opts) {
|
|
24005
24006
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24006
|
-
this.focusFirstColumn = true;
|
|
24007
|
-
this.focusColumn = (opts === null || opts === void 0 ? void 0 : opts.focusColumn) || this.firstUserColumn;
|
|
24008
24007
|
const row = yield this._dataSource.createNew(insertAt, Object.assign({ editing: true }, opts));
|
|
24009
24008
|
if (!row)
|
|
24010
24009
|
return undefined;
|
|
24011
|
-
// Emit start editing event
|
|
24012
24010
|
if (row.editing) {
|
|
24011
|
+
// Update focused column
|
|
24012
|
+
this.focusFirstColumn = true;
|
|
24013
|
+
this.focusColumn = (opts === null || opts === void 0 ? void 0 : opts.focusColumn) || this.firstUserColumn;
|
|
24014
|
+
// Emit start editing event
|
|
24013
24015
|
this.editedRow = row;
|
|
24014
24016
|
this.onStartEditingRow.emit(this.editedRow);
|
|
24015
24017
|
}
|
|
24016
24018
|
this.totalRowCount++;
|
|
24017
24019
|
this.visibleRowCount++;
|
|
24018
24020
|
this.markAsDirty({ emitEvent: false /*markForCheck() is called just after*/ });
|
|
24019
|
-
|
|
24021
|
+
// Emit event
|
|
24022
|
+
if (!opts || opts.emitEvent !== false)
|
|
24023
|
+
this.markForCheck();
|
|
24020
24024
|
return row;
|
|
24021
24025
|
});
|
|
24022
24026
|
}
|