A FancytreeNode represents the hierarchical data model and operations.
| 242 | |
| 243 | /** A FancytreeNode represents the hierarchical data model and operations. */ |
| 244 | interface FancytreeNode { |
| 245 | // #region Properties |
| 246 | /** The tree instance */ |
| 247 | tree: Fancytree; |
| 248 | /** The parent node */ |
| 249 | parent: FancytreeNode; |
| 250 | /** Node id (must be unique inside the tree) */ |
| 251 | key: string; |
| 252 | /** Display name (may contain HTML) */ |
| 253 | title: string; |
| 254 | /** Contains all extra data that was passed on node creation */ |
| 255 | data: FancytreeNodeData; |
| 256 | /** Array of child nodes. For lazy nodes, null or undefined means 'not yet loaded'. Use an empty array to define a node that has no children. */ |
| 257 | children: FancytreeNode[]; |
| 258 | /** Use isExpanded(), setExpanded() to access this property. */ |
| 259 | expanded: boolean; |
| 260 | /** Addtional CSS classes, added to the node's `<span>`. */ |
| 261 | extraClasses: string; |
| 262 | /** Folder nodes have different default icons and click behavior. Note: Also non-folders may have children. */ |
| 263 | folder: boolean; |
| 264 | /** Icon of the tree node. */ |
| 265 | icon: string; |
| 266 | /** null or type of temporarily generated system node like 'loading', or 'error'. */ |
| 267 | statusNodeType: string; |
| 268 | /** True if this node is loaded on demand, i.e. on first expansion. */ |
| 269 | lazy: boolean; |
| 270 | /** Alternative description used as hover banner */ |
| 271 | tooltip: string; |
| 272 | /** Outer element of single nodes */ |
| 273 | span: HTMLElement; |
| 274 | /** Outer element of single nodes for table extension */ |
| 275 | tr: HTMLTableRowElement; |
| 276 | unselectable?: boolean | undefined; |
| 277 | unselectableIgnore?: boolean | undefined; |
| 278 | unselectableStatus?: boolean | undefined; |
| 279 | |
| 280 | // #endregion |
| 281 | |
| 282 | // #region Methods |
| 283 | /** |
| 284 | * Append (or insert) a list of child nodes. |
| 285 | * |
| 286 | * @param children array of child node definitions (also single child accepted) |
| 287 | * @param insertBefore child node to insert nodes before. If omitted, the new children is appended. |
| 288 | * @returns The first child added. |
| 289 | */ |
| 290 | addChildren(children: Fancytree.NodeData[], insertBefore?: FancytreeNode): FancytreeNode; |
| 291 | /** |
| 292 | * Append (or insert) a list of child nodes. |
| 293 | * |
| 294 | * @param children array of child node definitions (also single child accepted) |
| 295 | * @param insertBefore key of the child node to insert nodes before. If omitted, the new children is appended. |
| 296 | * @returns The first child added. |
| 297 | */ |
| 298 | addChildren(children: Fancytree.NodeData[], insertBefore?: string): FancytreeNode; |
| 299 | /** |
| 300 | * Append (or insert) a list of child nodes. |
| 301 | * |
no outgoing calls
no test coverage detected