Add finally handler for rename tree node action (#1403)

* Add finally handler for rename tree node action

* nit
This commit is contained in:
Chenlei Hu
2024-11-02 11:39:15 -04:00
committed by GitHub
parent caa3ac2068
commit cc420b70a5
4 changed files with 21 additions and 13 deletions

View File

@@ -80,9 +80,11 @@ const errorHandling = useErrorHandling()
const handleRename = errorHandling.wrapWithErrorHandlingAsync(
async (newName: string) => {
await props.node.handleRename(props.node, newName)
renameEditingNode.value = null
},
props.node.handleError
props.node.handleError,
() => {
renameEditingNode.value = null
}
)
const container = ref<HTMLElement | null>(null)
const canDrop = ref(false)