fix database edit not refreshing data after save
This commit is contained in:
parent
4d94137bbd
commit
a6f7d92b99
3 changed files with 15 additions and 6 deletions
|
|
@ -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}`)
|
||||
|
|
|
|||
|
|
@ -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}`)
|
||||
|
|
|
|||
|
|
@ -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}`)
|
||||
|
|
|
|||
Loading…
Reference in a new issue