GitHub

DaffTreeData

interface

import { DaffTreeData } from '@daffodil/design/tree'

A basic tree type supporting supplemental data on a tree node.

Tree elements are often slightly more than just basic titles and child items. There may be other important data that needs to be available at render time.

interface DaffTreeData<T> {
  title: string
  url: string
  id: string
  items: DaffTreeData<T>[]
  data: T
}

Properties

title
string

The label displayed for a tree node.

url
string

A URL associated with a tree node, which can be used for navigation or linking.

id
string

A unique ID for a tree node.

items
DaffTreeData[]

An array of child nodes, each of which is also a DaffTreeData item.

data
T

Additional data associated with a tree node.