Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IProps<NodeType>

Type parameters

Hierarchy

  • IProps

Index

Properties

Optional allowMultiselect

allowMultiselect: undefined | false | true

Whether to allow multiple nodes to be selected at once.

default

false

remarks

If this is true, previously selected nodes won't be cleared by selecting a new one.

TODO: Change this to be more like a desktop multiselect: shift+click, ctrl+shift+click, etc.

Optional controller

controller: TreeController<NodeType>

Optional dragScope

dragScope: undefined | string

An optional scope to limit tree-to-tree dragging to.

Optional globalHandler

globalHandler: EventTarget

The element to use for attaching global event listeners.

default

window.document

remarks

The tree list adds a few global event listeners to maintain a consistent UX state- for instance, when releasing the mouse off the tree, the list control must undo any 'drag' state.

If this component is being rendered in a popup, then this must be set to the popup's document.

TODO: I might change this to use a ref with ownerDocument, making this option unnecessary.

model

model: TreeModel<NodeType>

The model to use for this tree view.

Optional onSelected

onSelected: undefined | function

Optional render

render: undefined | function

A callback for rendering a single node in the tree.

Optional renderDragPreview

renderDragPreview: undefined | function

A callback for rendering the drag-preview tooltip, if dragging is enabled.

Optional showPreviews

showPreviews: undefined | false | true

Whether to show previews when dragging nodes

default

true

Generated using TypeDoc