Fix workspace form not refreshing when project accessed via URL key
The invalidateProject() in ProjectProperties only invalidated queryKeys.projects.detail(project.id) (UUID), but the parent ProjectDetail query uses routeProjectRef which is typically the URL key (e.g. "openclaw-testing"). This meant mutations succeeded but the parent query was never refetched — the UI only updated on page refresh. Now also invalidates via project.urlKey so both UUID and URL-key based query caches are cleared. Co-Authored-By: Paperclip <noreply@paperclip.ing> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3456808e1c
commit
81b4e4f826
1 changed files with 3 additions and 0 deletions
|
|
@ -205,6 +205,9 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa
|
|||
|
||||
const invalidateProject = () => {
|
||||
queryClient.invalidateQueries({ queryKey: queryKeys.projects.detail(project.id) });
|
||||
if (project.urlKey !== project.id) {
|
||||
queryClient.invalidateQueries({ queryKey: queryKeys.projects.detail(project.urlKey) });
|
||||
}
|
||||
if (selectedCompanyId) {
|
||||
queryClient.invalidateQueries({ queryKey: queryKeys.projects.list(selectedCompanyId) });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue