fix: Saved View preserves loadingHistogram State, leading to track total hits call on applying. (#9084)

#9079 
1. A view was saved while the histogram was being loaded, which
incorrectly hardcoded the loadingHistogram flag as true in the saved
view data.
2. When this saved view was later loaded, the true value of
loadingHistogram was retrieved.
3. This pre-existing true state bypassed the histogram loading logic and
resulted in an incorrect call to the get page count.
This commit is contained in:
Omkar Kesarkhane
2025-11-17 23:45:08 +05:30
committed by GitHub
parent ee3bc9c11c
commit 91c52ea318
+10 -1
View File
@@ -3228,10 +3228,11 @@ export default defineComponent({
});
setTimeout(async () => {
try {
searchObj.loadingHistogram = false;
searchObj.loading = true;
searchObj.meta.refreshHistogram = true;
// TODO OK: Remove all the instances of communicationMethod and below assignment aswell
searchObj.communicationMethod = "streaming";
searchObj.communicationMethod = "streaming";
await extractFields();
await getQueryData();
store.dispatch("setSavedViewFlag", false);
@@ -3411,6 +3412,14 @@ export default defineComponent({
delete savedSearchObj.data.savedViews;
delete savedSearchObj.data.transforms;
// Turn off all loaders before saving view
savedSearchObj.loading = false;
savedSearchObj.loadingHistogram = false;
savedSearchObj.loadingCounter = false;
savedSearchObj.loadingStream = false;
savedSearchObj.loadingSavedView = false;
savedSearchObj.data.timezone = store.state.timezone;
if (savedSearchObj.data.parsedQuery) {