@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
|
@@ -26632,11 +26632,12 @@
|
|
|
26632
26632
|
});
|
|
26633
26633
|
AppTable.prototype.ngOnInit = function () {
|
|
26634
26634
|
var _this = this;
|
|
26635
|
+
var _a;
|
|
26635
26636
|
if (this._initialized)
|
|
26636
26637
|
return; // Init only once
|
|
26637
26638
|
this._initialized = true;
|
|
26638
26639
|
// Set defaults
|
|
26639
|
-
this.readOnly = toBoolean(this.readOnly, false); // read/write by default
|
|
26640
|
+
this.readOnly = toBoolean(this.readOnly, ((_a = this.dataSource) === null || _a === void 0 ? void 0 : _a.config.readOnly) || false); // read/write by default
|
|
26640
26641
|
this.inlineEdition = !this.readOnly && toBoolean(this.inlineEdition, false); // force to false when readonly
|
|
26641
26642
|
this.saveBeforeDelete = toBoolean(this.saveBeforeDelete, !this.readOnly); // force to false when readonly
|
|
26642
26643
|
this.saveBeforeSort = toBoolean(this.saveBeforeSort, !this.readOnly); // force to false when readonly
|
|
@@ -27802,23 +27803,25 @@
|
|
|
27802
27803
|
var row;
|
|
27803
27804
|
return __generator(this, function (_e) {
|
|
27804
27805
|
switch (_e.label) {
|
|
27805
|
-
case 0:
|
|
27806
|
-
this.focusFirstColumn = true;
|
|
27807
|
-
this.focusColumn = (opts === null || opts === void 0 ? void 0 : opts.focusColumn) || this.firstUserColumn;
|
|
27808
|
-
return [4 /*yield*/, this._dataSource.createNew(insertAt, Object.assign({ editing: true }, opts))];
|
|
27806
|
+
case 0: return [4 /*yield*/, this._dataSource.createNew(insertAt, Object.assign({ editing: true }, opts))];
|
|
27809
27807
|
case 1:
|
|
27810
27808
|
row = _e.sent();
|
|
27811
27809
|
if (!row)
|
|
27812
27810
|
return [2 /*return*/, undefined];
|
|
27813
|
-
// Emit start editing event
|
|
27814
27811
|
if (row.editing) {
|
|
27812
|
+
// Update focused column
|
|
27813
|
+
this.focusFirstColumn = true;
|
|
27814
|
+
this.focusColumn = (opts === null || opts === void 0 ? void 0 : opts.focusColumn) || this.firstUserColumn;
|
|
27815
|
+
// Emit start editing event
|
|
27815
27816
|
this.editedRow = row;
|
|
27816
27817
|
this.onStartEditingRow.emit(this.editedRow);
|
|
27817
27818
|
}
|
|
27818
27819
|
this.totalRowCount++;
|
|
27819
27820
|
this.visibleRowCount++;
|
|
27820
27821
|
this.markAsDirty({ emitEvent: false /*markForCheck() is called just after*/ });
|
|
27821
|
-
|
|
27822
|
+
// Emit event
|
|
27823
|
+
if (!opts || opts.emitEvent !== false)
|
|
27824
|
+
this.markForCheck();
|
|
27822
27825
|
return [2 /*return*/, row];
|
|
27823
27826
|
}
|
|
27824
27827
|
});
|