mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Add LoadingButton #4368 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -321,7 +321,7 @@ export const useRenameTag = () => {
|
||||
isPending: loading,
|
||||
mutateAsync,
|
||||
} = useMutation({
|
||||
mutationKey: ['deleteTag'],
|
||||
mutationKey: ['renameTag'],
|
||||
mutationFn: async (params: IRenameTag) => {
|
||||
const { data } = await renameTag(knowledgeBaseId, params);
|
||||
if (data.code === 0) {
|
||||
@ -337,4 +337,8 @@ export const useRenameTag = () => {
|
||||
return { data, loading, renameTag: mutateAsync };
|
||||
};
|
||||
|
||||
export const useTagIsRenaming = () => {
|
||||
return useIsMutating({ mutationKey: ['renameTag'] }) > 0;
|
||||
};
|
||||
|
||||
//#endregion
|
||||
|
||||
Reference in New Issue
Block a user