fix: Refactor usePatchUpdateFlow mutation to include refetchQueries (#3736)
* refactor: Add refetchQueries to usePatchUpdateFlow mutation * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
af99b4c32a
commit
b6df370fcc
1 changed files with 6 additions and 1 deletions
|
|
@ -33,7 +33,12 @@ export const usePatchUpdateFlow: useMutationFunctionType<
|
||||||
};
|
};
|
||||||
|
|
||||||
const mutation: UseMutationResult<IPatchUpdateFlow, any, IPatchUpdateFlow> =
|
const mutation: UseMutationResult<IPatchUpdateFlow, any, IPatchUpdateFlow> =
|
||||||
mutate(["usePatchUpdateFlow"], PatchUpdateFlowFn, options);
|
mutate(["usePatchUpdateFlow"], PatchUpdateFlowFn, {
|
||||||
|
onSettled: () => {
|
||||||
|
queryClient.refetchQueries({ queryKey: ["useGetFolder"] });
|
||||||
|
},
|
||||||
|
...options,
|
||||||
|
});
|
||||||
|
|
||||||
return mutation;
|
return mutation;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue