- improved behavior when updating and searching

This commit is contained in:
Sören Oesterwind 2023-07-08 00:22:09 +02:00
parent 0233453084
commit 0e4bc7669a

View File

@ -5,11 +5,19 @@ const FLAG_supports_new_data_loader = true;
* https://examples.bootstrap-table.com/index.html?extensions/treegrid.html#extensions/treegrid.html * https://examples.bootstrap-table.com/index.html?extensions/treegrid.html#extensions/treegrid.html
*/ */
// Inital thing
const itemList = $('#itemList');
// itemList.empty();
itemList.bootstrapTable({url: "/api/v1/items", search: true, showRefresh: true, responseHandler: dataResponseHandler, sidePagination: 'server', serverSort: true})
setTimeout(() => {
activateTooltips();
}, 1000);
function loadPageData() { function loadPageData() {
const itemList = $('#itemList'); const itemList = $('#itemList');
// itemList.empty(); // itemList.empty();
itemList.bootstrapTable('destroy') itemList.bootstrapTable('refresh')
itemList.bootstrapTable({url: "/api/v1/items", search: true, showRefresh: true, responseHandler: dataResponseHandler, sidePagination: 'server', serverSort: true})
setTimeout(() => { setTimeout(() => {
activateTooltips(); activateTooltips();
}, 1000); }, 1000);