fix: update loading state via superstor

This commit is contained in:
Johnson Cherian 2024-04-23 19:40:58 +05:30
parent 8b70fa935c
commit f238ab2bb8

View file

@ -250,7 +250,9 @@ export function createDataQueriesStore(moduleName) {
actions.setSelectedQuery(null);
toast.error(`Failed to create query: ${error.message}`);
})
.finally(() => useAppDataStore.getState().actions.setIsSaving(false));
.finally(() =>
useSuperStore.getState().modules[get().moduleName].useAppDataStore.getState().actions.setIsSaving(false)
);
},
renameQuery: (id, newName) => {
/** If query creation in progress, skips call and pushes the update to queue */