Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore(frontend): minor fixes for sheet store (#10808)

Liu Jid266ff075731
diff --git a/frontend/src/components/IssueV1/components/StatementSection/useTaskSheet.ts b/frontend/src/components/IssueV1/components/StatementSection/useTaskSheet.ts
index 1f976b7eda..41eb8dac17 100644
--- a/frontend/src/components/IssueV1/components/StatementSection/useTaskSheet.ts
+++ b/frontend/src/components/IssueV1/components/StatementSection/useTaskSheet.ts
@@ -18,7 +18,10 @@ export const useTaskSheet = () => {
const sheetName = computed(() => {
return sheetNameOfTaskV1(selectedTask.value);
});
- const sheetReady = ref(false);
+ const isFetchingSheet = ref(false);
+ const sheetReady = computed(() => {
+ return !isFetchingSheet.value;
+ });
const sheet = computedAsync(
async () => {
const name = sheetName.value;
@@ -32,7 +35,7 @@ export const useTaskSheet = () => {
},
undefined,
{
- evaluating: sheetReady,
+ evaluating: isFetchingSheet,
}
);
const sheetStatement = computed({
diff --git a/frontend/src/store/modules/v1/sheet.ts b/frontend/src/store/modules/v1/sheet.ts
index e92a4e2413..39c44307f8 100644
--- a/frontend/src/store/modules/v1/sheet.ts
+++ b/frontend/src/store/modules/v1/sheet.ts
@@ -102,11 +102,11 @@ export const useSheetV1Store = defineStore("sheet_v1", () => {
if (uid.startsWith("-") || !uid) {
return undefined;
}
- const entity = getSheetByUID(name, view);
+ const entity = getSheetByUID(uid, view);
if (entity) {
return entity;
}
- const request = getSheetRequestByUID(name, view);
+ const request = getSheetRequestByUID(uid, view);
if (request) {
return request;
}
@@ -118,6 +118,7 @@ export const useSheetV1Store = defineStore("sheet_v1", () => {
// If the request failed
// remove the request cache entry so we can retry when needed.
cacheByUID.invalidateRequest([uid, view ?? "BASIC"]);
+ return;
}
});
return promise;