Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[23.1] Fix History item deletion/undeletion reactivity with filter and ToolForm input field #16889

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/src/components/Form/FormDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default {
visitInputs(this.formInputs, (input, name) => {
const newValue = newAttributes[name];
if (newValue != undefined) {
input.attributes = newValue;
Vue.set(input, "attributes", newValue);
}
});
this.onChangeForm();
Expand Down
27 changes: 19 additions & 8 deletions client/src/components/History/CurrentHistory/HistoryPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -310,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
Expand All @@ -323,13 +332,15 @@ export default {
...mapActions(useHistoryItemsStore, ["fetchHistoryItems"]),
getHighlight(item) {
const highlightsKey = FilterClass.getFilterValue(this.filterText, "related");
if (highlightsKey == item.hid) {
return "active";
} else if (highlightsKey) {
if (item.hid > highlightsKey) {
return "output";
} else {
return "input";
if (!this.loading) {
if (highlightsKey == item.hid) {
return "active";
} else if (highlightsKey) {
if (item.hid > highlightsKey) {
return "output";
} else {
return "input";
}
}
} else {
return null;
Expand All @@ -346,14 +357,14 @@ 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.loading = false;
}
},
Expand Down
Loading