primevue-mirror/packages/primevue/src/treenode/TreeNode.d.ts

72 lines
1.3 KiB
TypeScript
Raw Normal View History

2023-11-23 14:00:44 +00:00
/**
*
* PrimeVue tree components share a common api to specify the node.
*
* @module treenode
*
*/
/**
* Custom TreeNode metadata.
*/
export interface TreeNode {
/**
* Mandatory unique key of the node.
*/
key: string;
2023-11-23 14:00:44 +00:00
/**
* Label of the node.
*/
label?: string;
/**
* Data represented by the node.
*/
data?: any;
/**
* Type of the node to match a template.
*/
type?: string;
/**
* Icon of the node to display next to content.
*/
icon?: string;
/**
* An array of treenodes as children.
*/
children?: TreeNode[];
/**
* Inline style of the node.
*/
style?: any;
/**
* Style class of the node.
*/
styleClass?: string;
/**
* Whether the node is selectable when selection mode is enabled.
2024-08-01 11:14:49 +00:00
* @defaultValue null
2023-11-23 14:00:44 +00:00
*/
selectable?: boolean;
/**
* Specifies if the node has children. Used in lazy loading.
* @defaultValue false
*/
leaf?: boolean;
/**
2023-11-28 09:15:37 +00:00
* Specifies the node loading. Used in Tree and TreeTable.
2023-11-23 14:00:44 +00:00
*/
2023-11-28 09:15:37 +00:00
loading?: boolean;
2023-11-23 14:00:44 +00:00
/**
* Icon to use in expanded state.
*/
expandedIcon?: string;
/**
* Icon to use in collapsed state.
*/
collapsedIcon?: string;
2023-11-28 09:15:37 +00:00
/**
* Optional
*/
[key: string]: any;
2023-11-23 14:00:44 +00:00
}