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

@@ -177,12 +177,12 @@ const renderTreeNode = (node: TreeNode): TreeExplorerNode<ComfyWorkflow> => {
const actions = node.leaf
? {
handleClick,
handleRename: (
handleRename: async (
node: TreeExplorerNode<ComfyWorkflow>,
newName: string
) => {
const workflow = node.data
workflow.rename(newName)
await workflow.rename(newName)
},
handleDelete: workflow.isTemporary
? undefined