change property downloadTitle to titleDownload for Tabulator 5, call tabulator redraw at the end of tableInit callback to ensure renderStart callbacks are run

This commit is contained in:
Harald Bamberger
2024-11-15 15:19:09 +01:00
parent daf432fe8d
commit 488847984e
3 changed files with 9 additions and 7 deletions
@@ -172,7 +172,7 @@ function func_tableBuilt(table) {
field: "status",
width: 40,
hozAlign: "center",
downloadTitle: "Status",
titleDownload: "Status",
formatter: status_formatter,
tooltip: status_tooltip,
},
@@ -477,6 +477,7 @@ $(function () {
default:
break;
}
tabulatorInstance.redraw(true);
});
var canPromise = !!window.Promise;
@@ -216,7 +216,7 @@ function func_tableBuilt(table) {
field: "status",
width: 40,
hozAlign: "center",
downloadTitle: "Status",
titleDownload: "Status",
formatter: status_formatter,
tooltip: status_tooltip,
},
@@ -488,6 +488,7 @@ $(function () {
$("#tableWidgetTabulator").tabulator("on", "rowUpdated", (row) =>
func_rowUpdated(row)
);
$("#tableWidgetTabulator").tabulator("redraw", true);
});
// Redraw table on resize to fit tabulators height to windows height
@@ -245,7 +245,7 @@ function func_tableBuilt(table) {
field: "status",
width: 40,
hozAlign: "center",
downloadTitle: "Status",
titleDownload: "Status",
formatter: status_formatter,
tooltip: status_tooltip,
},
@@ -548,10 +548,10 @@ $(function () {
func_renderStarted(tabulatorInstance);
});
// event dataLoaded needs to be attached as a callback to the tableBuilt event in tabulator5
$("#tableWidgetTabulator").tabulator("on", "dataLoaded", (data) => {
func_dataLoaded(data, tabulatorInstance);
});
// set initial filter
func_dataLoaded(null, tabulatorInstance);
$("#tableWidgetTabulator").tabulator("redraw", true);
});
// Redraw table on resize to fit tabulators height to windows height