feat(mongodb): improve document quick filters
This commit is contained in:
1 parent
c417e54698
commit
681da22c33
32 files changed
+1639
-116
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { uuid } from "@/lib/common/utils";
|
||||
import { markRaw, ref, watch, computed } from "vue";
|
||||
import { computed, markRaw, onScopeDispose, ref, watch } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import type { ConnectionConfig, DatabaseType, ObjectBrowserViewport, QueryResult, QueryTab, TableInfoTab, TableStructureEditorTarget } from "@/types/database";
|
||||
import { orderPinnedFirst } from "@/lib/app/pinnedItems";
|
||||
@@ -999,6 +999,11 @@ export const useQueryStore = defineStore("query", () => {
|
||||
{ flush: "post" },
|
||||
);
|
||||
|
||||
onScopeDispose(() => {
|
||||
if (persistTimer) clearTimeout(persistTimer);
|
||||
persistTimer = null;
|
||||
});
|
||||
|
||||
// Immediately flush any pending debounced persist so the on-disk content
|
||||
// reflects the latest in-memory tabs without waiting for the 300ms debounce.
|
||||
// Lets callers (e.g. tests that reload the store) read back persisted state
|
||||
|
||||
Reference in new issue
Block a user