BlueprintTable: Invalidate tags on deleteBlueprint

Invalidates Composes and ComposeBlueprints tags upon deleting a
blueprint so that composes are re-fetched and the table is updated
appropriately.

Previously, a deleted blueprints composes would still show in the table
until the page was refreshed.
This commit is contained in:
lucasgarfield 2024-04-30 18:05:41 +02:00 committed by Klara Simickova
parent 726cd328c5
commit 13d35a834e

View file

@ -190,7 +190,11 @@ const enhancedApi = imageBuilderApi.enhanceEndpoints({
},
},
deleteBlueprint: {
invalidatesTags: [{ type: 'Blueprints' }],
invalidatesTags: [
{ type: 'Blueprints' },
{ type: 'BlueprintComposes' },
{ type: 'Compose' },
],
onQueryStarted: async (_, { dispatch, queryFulfilled }) => {
queryFulfilled
.then(() => {