Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TreeViewOptions<T>

Options for creating a TreeView

Type parameters

  • T

Hierarchy

  • TreeViewOptions

Index

Properties(5)

treeDataProvider

treeDataProvider: TreeDataProvider<T>

A data provider that provides tree data.

Optional showCollapseAll

showCollapseAll: boolean

Whether to show collapse all action or not.

Optional canSelectMany

canSelectMany: boolean

Whether the tree supports multi-select. When the tree supports multi-select and a command is executed from the tree, the first argument to the command is the tree item that the command was executed on and the second argument is an array containing all selected tree items.

Optional dragAndDropController

dragAndDropController: TreeDragAndDropController<T>

An optional interface to implement drag and drop in the tree view.

Optional manageCheckboxStateManually

manageCheckboxStateManually: boolean

By default, when the children of a tree item have already been fetched, child checkboxes are automatically managed based on the checked state of the parent tree item. If the tree item is collapsed by default (meaning that the children haven't yet been fetched) then child checkboxes will not be updated. To override this behavior and manage child and parent checkbox state in the extension, set this to true.

Examples where TreeViewOptions.manageCheckboxStateManually is false, the default behavior:

  1. A tree item is checked, then its children are fetched. The children will be checked.

  2. A tree item's parent is checked. The tree item and all of it's siblings will be checked.

  • Parent
    • Child 1
    • Child 2 When the user checks Parent, the tree will look like this:
  • Parent
    • Child 1
    • Child 2
  1. A tree item and all of it's siblings are checked. The parent will be checked.
  • Parent
    • Child 1
    • Child 2 When the user checks Child 1 and Child 2, the tree will look like this:
  • Parent
    • Child 1
    • Child 2
  1. A tree item is unchecked. The parent will be unchecked.
  • Parent
    • Child 1
    • Child 2 When the user unchecks Child 1, the tree will look like this:
  • Parent
    • Child 1
    • Child 2

Generated by TypeDoc. Maintained by 洛竹