mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 17:10:07 +00:00
Add finally handler for rename tree node action (#1403)
* Add finally handler for rename tree node action * nit
This commit is contained in:
@@ -39,7 +39,6 @@ import { useI18n } from 'vue-i18n'
|
||||
import { useTreeExpansion } from '@/hooks/treeHooks'
|
||||
import { app } from '@/scripts/app'
|
||||
import { findNodeByKey } from '@/utils/treeUtil'
|
||||
import { useErrorHandling } from '@/hooks/errorHooks'
|
||||
|
||||
const props = defineProps<{
|
||||
filteredNodeDefs: ComfyNodeDefImpl[]
|
||||
@@ -212,13 +211,11 @@ defineExpose({
|
||||
addNewBookmarkFolder
|
||||
})
|
||||
|
||||
const handleRename = useErrorHandling().wrapWithErrorHandling(
|
||||
(node: TreeNode, newName: string) => {
|
||||
if (node.data && node.data.isDummyFolder) {
|
||||
nodeBookmarkStore.renameBookmarkFolder(node.data, newName)
|
||||
}
|
||||
const handleRename = (node: TreeNode, newName: string) => {
|
||||
if (node.data && node.data.isDummyFolder) {
|
||||
nodeBookmarkStore.renameBookmarkFolder(node.data, newName)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
const showCustomizationDialog = ref(false)
|
||||
const initialIcon = ref(nodeBookmarkStore.defaultBookmarkIcon)
|
||||
|
||||
Reference in New Issue
Block a user