@sumaris-net/ngx-components 1.20.34 → 1.20.35
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 -10
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/table/table.class.js +7 -7
- package/esm2015/src/app/shared/material/autocomplete/material.autocomplete.js +5 -5
- package/fesm2015/sumaris-net.ngx-components.js +10 -10
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/table/table.class.d.ts +6 -2
|
@@ -1712,14 +1712,14 @@
|
|
|
1712
1712
|
// Wait a debounce time
|
|
1713
1713
|
operators.debounceTime(this.debounceTime)
|
|
1714
1714
|
// DEBUG
|
|
1715
|
-
|
|
1715
|
+
//,tap((value) => this.debug && console.debug(this.logPrefix + ' Search text changes:', value))
|
|
1716
|
+
),
|
|
1716
1717
|
// Object set: use it (no distinctUntilChanged() pipe need)
|
|
1717
1718
|
this.formControl.valueChanges
|
|
1718
1719
|
.pipe(operators.startWith(this.formControl.value), operators.filter(function (value) { return (isNotNil(value) && typeof value === 'object'); }), operators.tap(function (value) {
|
|
1719
|
-
var _a;
|
|
1720
1720
|
// DEBUG
|
|
1721
|
-
if (
|
|
1722
|
-
|
|
1721
|
+
//if (this.debug) console.debug(this.logPrefix + ' control object changes:', value);
|
|
1722
|
+
var _a;
|
|
1723
1723
|
// Update the display value (if need)
|
|
1724
1724
|
var displayValue = _this.displayWith(value) || '';
|
|
1725
1725
|
if (_this.displayValue !== displayValue) {
|
|
@@ -26600,7 +26600,7 @@
|
|
|
26600
26600
|
.then(function () { return _this.editRowById(event, row.id, { focusColumn: _this.lastUserColumn }); });
|
|
26601
26601
|
return true;
|
|
26602
26602
|
}
|
|
26603
|
-
// Edit
|
|
26603
|
+
// Edit previous row
|
|
26604
26604
|
this.editRow(event, row, { focusColumn: this.lastUserColumn });
|
|
26605
26605
|
return true;
|
|
26606
26606
|
};
|
|
@@ -26628,8 +26628,7 @@
|
|
|
26628
26628
|
if (id < 0)
|
|
26629
26629
|
return [2 /*return*/];
|
|
26630
26630
|
if (!(id >= this.visibleRowCount)) return [3 /*break*/, 1];
|
|
26631
|
-
this.
|
|
26632
|
-
this.addRow(event);
|
|
26631
|
+
this.addRow(event, undefined, opts);
|
|
26633
26632
|
return [3 /*break*/, 3];
|
|
26634
26633
|
case 1: return [4 /*yield*/, this.dataSource.getRow(id)];
|
|
26635
26634
|
case 2:
|
|
@@ -26707,7 +26706,7 @@
|
|
|
26707
26706
|
this.cancelExistingRow(event, row, opts);
|
|
26708
26707
|
}
|
|
26709
26708
|
};
|
|
26710
|
-
AppTable.prototype.addRow = function (event, insertAt) {
|
|
26709
|
+
AppTable.prototype.addRow = function (event, insertAt, opts) {
|
|
26711
26710
|
if (this.debug)
|
|
26712
26711
|
console.debug('[table] Asking for new row...');
|
|
26713
26712
|
if (!this._enabled)
|
|
@@ -26722,7 +26721,7 @@
|
|
|
26722
26721
|
return false;
|
|
26723
26722
|
}
|
|
26724
26723
|
// Add new row
|
|
26725
|
-
this.addRowToTable(insertAt);
|
|
26724
|
+
this.addRowToTable(insertAt, opts);
|
|
26726
26725
|
return true;
|
|
26727
26726
|
};
|
|
26728
26727
|
AppTable.prototype.save = function (opts) {
|
|
@@ -27545,12 +27544,13 @@
|
|
|
27545
27544
|
//if (this.debug) console.debug("[table] id = " + id);
|
|
27546
27545
|
return id;
|
|
27547
27546
|
};
|
|
27548
|
-
AppTable.prototype.addRowToTable = function (insertAt) {
|
|
27547
|
+
AppTable.prototype.addRowToTable = function (insertAt, opts) {
|
|
27549
27548
|
return __awaiter(this, void 0, void 0, function () {
|
|
27550
27549
|
return __generator(this, function (_e) {
|
|
27551
27550
|
switch (_e.label) {
|
|
27552
27551
|
case 0:
|
|
27553
27552
|
this.focusFirstColumn = true;
|
|
27553
|
+
this.focusColumn = (opts === null || opts === void 0 ? void 0 : opts.focusColumn) || this.firstUserColumn;
|
|
27554
27554
|
return [4 /*yield*/, this._dataSource.asyncCreateNew(insertAt)];
|
|
27555
27555
|
case 1:
|
|
27556
27556
|
_e.sent();
|