Mixins / foldkit-mixins-ui

TreeNode

interface · packages/mixins-ui/src/treeView.ts:49

interface TreeNode {
  readonly id: string
  readonly label: string
  readonly children?: ReadonlyArray<TreeNode> | undefined
  readonly disabled?: boolean | undefined
  readonly icon?: Html | undefined
  readonly openIcon?: Html | undefined
  readonly content?: Html | undefined
  readonly trailing?: Html | undefined
  readonly action?: Html | undefined
}

A row of the tree, and the rows it holds.

Members

TreeNode.id

property · packages/mixins-ui/src/treeView.ts:50

readonly id: string

TreeNode.label

property · packages/mixins-ui/src/treeView.ts:51

readonly label: string

TreeNode.children

property · packages/mixins-ui/src/treeView.ts:52

readonly children?: ReadonlyArray<TreeNode> | undefined

TreeNode.disabled

property · packages/mixins-ui/src/treeView.ts:53

readonly disabled?: boolean | undefined

TreeNode.icon

property · packages/mixins-ui/src/treeView.ts:55

readonly icon?: Html | undefined

Drawn before the label: a file's kind, a shut folder.

TreeNode.openIcon

property · packages/mixins-ui/src/treeView.ts:57

readonly openIcon?: Html | undefined

Drawn in place of icon while the row is open: an open folder.

TreeNode.content

property · packages/mixins-ui/src/treeView.ts:59

readonly content?: Html | undefined

Drawn in place of the label's text: a name and a role, an avatar. label still names the row and is what typing matches.

TreeNode.trailing

property · packages/mixins-ui/src/treeView.ts:61

readonly trailing?: Html | undefined

Drawn after the label: a badge, a count.

TreeNode.action

property · packages/mixins-ui/src/treeView.ts:63

readonly action?: Html | undefined

Drawn at the row's end: a menu button, a delete. Its control stops its own press, or the row is chosen too.