mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 02:02:08 +00:00
[TS] Fix TreeExplorerNode types (#3163)
This commit is contained in:
@@ -8,10 +8,17 @@ export interface TreeExplorerNode<T = any> {
|
||||
data?: T
|
||||
children?: TreeExplorerNode<T>[]
|
||||
icon?: string
|
||||
/** Function to override what icon to use for the node */
|
||||
getIcon?: (this: TreeExplorerNode<T>) => string
|
||||
/** Function to override what text to use for the leaf-count badge on a folder node */
|
||||
getBadgeText?: (this: TreeExplorerNode<T>) => string
|
||||
/**
|
||||
* Function to override what icon to use for the node.
|
||||
* Return undefined to fallback to {@link icon} property.
|
||||
*/
|
||||
getIcon?: (this: TreeExplorerNode<T>) => string | undefined
|
||||
/**
|
||||
* Function to override what text to use for the leaf-count badge on a folder node.
|
||||
* Return undefined to fallback to default badge text, which is the subtree's leaf count.
|
||||
* Return empty string to hide the badge.
|
||||
*/
|
||||
getBadgeText?: (this: TreeExplorerNode<T>) => string | undefined
|
||||
/** Function to handle renaming the node */
|
||||
handleRename?: (
|
||||
this: TreeExplorerNode<T>,
|
||||
|
||||
Reference in New Issue
Block a user