mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-21 06:49:37 +00:00
Bind extra context menu items on TreeExplorerNode interface (#886)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import type { MenuItem } from 'primevue/menuitem'
|
||||
|
||||
export interface TreeExplorerNode<T = any> {
|
||||
key: string
|
||||
label: string
|
||||
@@ -28,6 +30,10 @@ export interface TreeExplorerNode<T = any> {
|
||||
handleClick?: (node: TreeExplorerNode<T>, event: MouseEvent) => void
|
||||
// Function to handle errors
|
||||
handleError?: (error: Error) => void
|
||||
// Extra context menu items
|
||||
contextMenuItems?:
|
||||
| MenuItem[]
|
||||
| ((targetNode: RenderedTreeExplorerNode) => MenuItem[])
|
||||
}
|
||||
|
||||
export interface RenderedTreeExplorerNode<T = any> extends TreeExplorerNode<T> {
|
||||
|
||||
Reference in New Issue
Block a user