fix database edit not refreshing data after save

This commit is contained in:
Justin Edmund 2025-12-23 12:59:31 -08:00
parent 4d94137bbd
commit a6f7d92b99
3 changed files with 15 additions and 6 deletions

View file

@ -245,8 +245,11 @@
await entityAdapter.updateCharacter(character.id, payload)
// Invalidate TanStack Query cache to refetch fresh data
await queryClient.invalidateQueries({ queryKey: ['character', character.granblueId] })
// Invalidate TanStack Query cache and force immediate refetch
await queryClient.invalidateQueries({
queryKey: ['character', character.granblueId],
refetchType: 'all'
})
// Navigate back to detail page
goto(`/database/characters/${character.granblueId}`)

View file

@ -174,8 +174,11 @@
await entityAdapter.updateSummon(summon.id, payload)
// Invalidate TanStack Query cache to refetch fresh data
await queryClient.invalidateQueries({ queryKey: ['summon', summon.granblueId] })
// Invalidate TanStack Query cache and force immediate refetch
await queryClient.invalidateQueries({
queryKey: ['summon', summon.granblueId],
refetchType: 'all'
})
// Navigate back to detail page
goto(`/database/summons/${summon.granblueId}`)

View file

@ -197,8 +197,11 @@
await entityAdapter.updateWeapon(weapon.id, payload)
// Invalidate TanStack Query cache to refetch fresh data
await queryClient.invalidateQueries({ queryKey: ['weapon', weapon.granblueId] })
// Invalidate TanStack Query cache and force immediate refetch
await queryClient.invalidateQueries({
queryKey: ['weapon', weapon.granblueId],
refetchType: 'all'
})
// Navigate back to detail page
goto(`/database/weapons/${weapon.granblueId}`)