Skip to content

Commit

Permalink
Fix HistoryPanel filter reactivity with deletions/undeletions
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed Oct 19, 2023
1 parent e4c4677 commit cf782d2
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions client/src/components/History/CurrentHistory/HistoryPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export default {
operationRunning: null,
operationError: null,
querySelectionBreak: false,
itemsLoaded: [],
};
},
computed: {
Expand Down Expand Up @@ -234,10 +235,6 @@ 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());
Expand Down Expand Up @@ -346,14 +343,22 @@ export default {
try {
await this.fetchHistoryItems(this.historyId, this.filterText, this.offset);
this.searchError = null;
this.loading = false;
} catch (error) {
if (error.response && error.response.data && error.response.data.err_msg) {
console.debug("HistoryPanel - Load items error:", error.response.data.err_msg);
this.searchError = error.response.data;
} else {
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;
}
},
Expand Down

0 comments on commit cf782d2

Please sign in to comment.