From 6e2b77111c88989726f0fdbd53866947030e6efb Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Mon, 23 Oct 2023 11:21:16 -0500 Subject: [PATCH] turn `itemsLoaded` back to computed to fix selenium --- .../History/CurrentHistory/HistoryPanel.vue | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/client/src/components/History/CurrentHistory/HistoryPanel.vue b/client/src/components/History/CurrentHistory/HistoryPanel.vue index 282c8a22ca17..aacb558c2443 100644 --- a/client/src/components/History/CurrentHistory/HistoryPanel.vue +++ b/client/src/components/History/CurrentHistory/HistoryPanel.vue @@ -206,7 +206,6 @@ export default { operationRunning: null, operationError: null, querySelectionBreak: false, - itemsLoaded: [], }; }, computed: { @@ -235,6 +234,10 @@ export default { isProcessing() { return this.operationRunning >= this.history.update_time; }, + /** @returns {Array} */ + itemsLoaded() { + return this.getHistoryItems(this.historyId, this.filterText); + }, /** @returns {Date} */ lastChecked() { const { getLastCheckedTime } = storeToRefs(useHistoryItemsStore()); @@ -307,6 +310,15 @@ export default { historyUpdateTime() { this.loadHistoryItems(); }, + itemsLoaded(newItems) { + if (this.invisible) { + newItems.forEach((item) => { + if (this.invisible[item.hid]) { + Vue.set(this.invisible, item.hid, false); + } + }); + } + }, }, async mounted() { // `filterable` here indicates if this is the current history panel @@ -353,14 +365,6 @@ export default { console.debug("HistoryPanel - Load items error.", error); } } finally { - this.itemsLoaded = this.getHistoryItems(this.historyId, this.filterText); - if (this.invisible) { - this.itemsLoaded.forEach((item) => { - if (this.invisible[item.hid]) { - Vue.set(this.invisible, item.hid, false); - } - }); - } this.loading = false; } },