tuain-ng-forms-lib 17.2.9 → 17.2.11
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.
|
@@ -1889,7 +1889,7 @@ class RecordTable extends FormElement {
|
|
|
1889
1889
|
this.setAttr(attrs.selectedRecords, this.getSelectedRecords());
|
|
1890
1890
|
return true;
|
|
1891
1891
|
}
|
|
1892
|
-
setTableRecords(tableRecords, append) {
|
|
1892
|
+
setTableRecords(tableRecords, append = false, prepend = false) {
|
|
1893
1893
|
if (!append) {
|
|
1894
1894
|
this._tableRecords = [];
|
|
1895
1895
|
this._tableRecordObj = {};
|
|
@@ -1901,13 +1901,19 @@ class RecordTable extends FormElement {
|
|
|
1901
1901
|
for (const tableRecord of tableRecords) {
|
|
1902
1902
|
const recordReceived = new TableRecordData(tableRecord, this._columns, this._selectionField);
|
|
1903
1903
|
const recordIdKey = recordReceived.recordIdKey;
|
|
1904
|
-
|
|
1904
|
+
if (prepend) {
|
|
1905
|
+
newRecords.unshift(recordReceived);
|
|
1906
|
+
}
|
|
1907
|
+
else {
|
|
1908
|
+
newRecords.push(recordReceived);
|
|
1909
|
+
}
|
|
1905
1910
|
newRecordsObj[recordIdKey] = recordReceived;
|
|
1906
1911
|
}
|
|
1907
1912
|
this._tableRecords = newRecords;
|
|
1908
1913
|
this._tableRecordObj = newRecordsObj;
|
|
1909
1914
|
}
|
|
1910
1915
|
appendRecords(records) { this.setTableRecords(records, true); }
|
|
1916
|
+
prependRecords(records) { this.setTableRecords(records, true, true); }
|
|
1911
1917
|
replaceRecords(records) { this.setTableRecords(records, false); }
|
|
1912
1918
|
setTableAppend(append) { this._appendPages = append; }
|
|
1913
1919
|
changePage(requestedPage) {
|
|
@@ -3644,6 +3650,7 @@ class BasicFormComponent extends FormStructureAndData {
|
|
|
3644
3650
|
console.log(`Acción ${code} en ejecución desde ${sent}`);
|
|
3645
3651
|
return;
|
|
3646
3652
|
}
|
|
3653
|
+
console.log(`Acción ${code} arranca desde ${new Date()}`);
|
|
3647
3654
|
this._actionsInProgress[code] = { sent: new Date() };
|
|
3648
3655
|
this.resetError();
|
|
3649
3656
|
actionObject.start();
|