From a6c403a4ac0e1f12d663a7a20228f5eebb583acf Mon Sep 17 00:00:00 2001 From: Simpler1 Date: Mon, 24 Jul 2023 15:13:53 -0400 Subject: [PATCH] Refresh table on show After opening an event from the events table and editing some properties, returning back to the events table would show the cached version of the table without the new values. This change will refresh the events table each time it's shown. It is a bit of a performance hit, but it's more important to show accurate information after a quick delay than to show bad/inaccurate information fast. --- web/skins/classic/views/js/events.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/skins/classic/views/js/events.js b/web/skins/classic/views/js/events.js index b778e39e4..da99042fc 100644 --- a/web/skins/classic/views/js/events.js +++ b/web/skins/classic/views/js/events.js @@ -420,6 +420,11 @@ function initPage() { } }); + window.onpageshow = function(evt) { + console.log('Refreshing table'); + table.bootstrapTable('refresh'); + }; + table.bootstrapTable('resetSearch'); // The table is initially given a hidden style, so now that we are done rendering, show it table.show();