mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
TreeNode .d.ts and apidoc updates
This commit is contained in:
parent
1100647eee
commit
fb6a5ceebf
9 changed files with 79 additions and 67 deletions
67
components/lib/treenode/TreeNode.d.ts
vendored
Normal file
67
components/lib/treenode/TreeNode.d.ts
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
/**
|
||||
*
|
||||
* 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;
|
||||
/**
|
||||
* 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.
|
||||
* @defaultValue false
|
||||
*/
|
||||
selectable?: boolean;
|
||||
/**
|
||||
* Specifies if the node has children. Used in lazy loading.
|
||||
* @defaultValue false
|
||||
*/
|
||||
leaf?: boolean;
|
||||
/**
|
||||
* Optional
|
||||
*/
|
||||
[key: string]: any;
|
||||
/**
|
||||
* Icon to use in expanded state.
|
||||
*/
|
||||
expandedIcon?: string;
|
||||
/**
|
||||
* Icon to use in collapsed state.
|
||||
*/
|
||||
collapsedIcon?: string;
|
||||
}
|
3
components/lib/treenode/package.json
Normal file
3
components/lib/treenode/package.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"types": "./TreeNode.d.ts"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue