From 0e4bc7669a194f7283b415727949904bf168aba9 Mon Sep 17 00:00:00 2001 From: grey Date: Sat, 8 Jul 2023 00:22:09 +0200 Subject: [PATCH] - improved behavior when updating and searching --- static/js/itemPageHandler.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/static/js/itemPageHandler.js b/static/js/itemPageHandler.js index 6313227..9960902 100644 --- a/static/js/itemPageHandler.js +++ b/static/js/itemPageHandler.js @@ -5,11 +5,19 @@ const FLAG_supports_new_data_loader = true; * 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() { const itemList = $('#itemList'); // itemList.empty(); - itemList.bootstrapTable('destroy') - itemList.bootstrapTable({url: "/api/v1/items", search: true, showRefresh: true, responseHandler: dataResponseHandler, sidePagination: 'server', serverSort: true}) + itemList.bootstrapTable('refresh') + setTimeout(() => { activateTooltips(); }, 1000);