Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BSTreeViewOptions

The global options to configure the treeView

Hierarchy

  • BSTreeViewOptions

Index

Constructors

constructor

Properties

ajaxURL

ajaxURL: string = null

The URL to fetch the data from. fetch() is used to get the data from this url

allowReselect

allowReselect: boolean = false

Whether or not a node can be reselected when its already selected, used in conjunction with preventUnselect. Default: false

backColor

backColor: string = undefined

Sets the default background color used by all nodes, except when overridden on a per node basis in data. Can be any valid color value

borderColor

borderColor: string | boolean = undefined

Sets the border color for the component; set showBorder to false if you don't want a visible border. Can be any valid color value

changedNodeColor

changedNodeColor: string = "#39A5DC"

Sets the text color for a node with a changed checkbox.

checkboxFirst

checkboxFirst: boolean = false

Swaps the node icon with the checkbox, used in conjunction with showCheckbox. Default false

checkedIcon

checkedIcon: string = "glyphicon glyphicon-check"

Sets the class name of the icon to be as a checked checkbox, used in conjunction with showCheckbox.

collapseIcon

collapseIcon: string = "glyphicon glyphicon-minus"

Sets the class name of the icon to be used on a collapsible tree node.

color

color: string = undefined

Sets the default foreground color used by all nodes, except when overridden on a per node basis in data. Can be any valid color value

data

data: BSTreeViewNode[] | string = null

The data to be displayed on the treeView. Can be either passed as array of nodes / partial node data or a JSON string of the same. Takes presence of ajaxURL

emptyIcon

emptyIcon: string = "glyphicon"

Sets the class name of icon to be used on a tree node with no child nodes.

expandIcon

expandIcon: string = "glyphicon glyphicon-plus"

Sets the class name of the icon to be used on an expandable tree node.

hierarchicalCheck

hierarchicalCheck: boolean = false

Whether or not to enable hierarchical checking/unchecking of checkboxes. Default false

highlightChanges

highlightChanges: boolean = false

Highlights the nodes with changed checkbox state, used in conjunction with showCheckbox. Default: false

highlightSearchResults

highlightSearchResults: boolean = true

Whether or not to highlight search results. Default false

highlightSelected

highlightSelected: boolean = true

Whether or not to highlight the selected node. Default true

injectStyle

injectStyle: boolean = true

lazyLoad

lazyLoad: (node: BSTreeViewNode, renderer: (nodes: BSTreeViewNode[]) => void) => void = undefined

This function is called when a lazily-loadable node is being expanded for the first time. The node is available as the first argument, while the second argument is a function responsible for passing the loaded data to the renderer. The data needs to be in the same JSON format as specified above.

Type declaration

levels

levels: number = 1

Sets the number of hierarchical levels deep the tree will be expanded to by default.

loadingIcon

loadingIcon: string = "glyphicon glyphicon-hourglass"

Sets the icon to be used on an a lazyLoad node before its content gets loaded.

multiSelect

multiSelect: boolean = false

Whether or not multiple nodes can be selected at the same time. Default false

nodeIcon

nodeIcon: string = ""

Sets the default icon to be used on all nodes, except when overridden on a per node basis in data.

onDestroyed

onDestroyed: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onInitialized

onInitialized: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onLoading

onLoading: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onLoadingFailed

onLoadingFailed: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onNodeChecked

onNodeChecked: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onNodeCollapsed

onNodeCollapsed: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onNodeDisabled

onNodeDisabled: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onNodeEnabled

onNodeEnabled: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onNodeExpanded

onNodeExpanded: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onNodeRendered

onNodeRendered: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onNodeSelected

onNodeSelected: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onNodeUnchecked

onNodeUnchecked: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onNodeUnselected

onNodeUnselected: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onRendered

onRendered: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onSearchCleared

onSearchCleared: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onSearchComplete

onSearchComplete: (event: Event) => void = undefined

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

onhoverColor

onhoverColor: string = "#F5F5F5"

Sets the default background color activated when the users cursor hovers over a node.

partiallyCheckedIcon

partiallyCheckedIcon: string = "glyphicon glyphicon-expand"

Sets the class name of icon to be as a partially checked checkbox, used in conjunction with showCheckbox and hierarchicalCheck.

preventUnselect

preventUnselect: boolean = false

Whether or not a node can be unselected without another node first being selected. Default: false

propagateCheckEvent

propagateCheckEvent: boolean = false

Whether or not to propagate nodeChecked and nodeUnchecked events to the parent/child nodes, used in conjunction with hierarchicalCheck. Default false.

searchResultBackColor

searchResultBackColor: string = undefined

Sets the background color of a node found during a search result

searchResultColor

searchResultColor: string = "#D9534F"

Sets the foreground color of a node found during a search result

selectedBackColor

selectedBackColor: string = "#428bca"

Sets the background color of the selected node.

selectedColor

selectedColor: string = "#FFFFFF"

Sets the foreground color of a selected node. Defaults to black

selectedIcon

selectedIcon: string = ""

Sets the default icon to be used on all selected nodes, except when overridden on a per node basis in data.

showBorder

showBorder: boolean = true

Whether or not to display a border around nodes.

showCheckbox

showCheckbox: boolean = false

Whether or not to display checkboxes on nodes.

showIcon

showIcon: boolean = true

Whether or not to display a nodes icon. Default: true

showImage

showImage: boolean = false

Whether or not to display a nodes image instead of the icon.

showTags

showTags: boolean = false

Whether or not to display tags to the right of each node. The values of which must be provided in the data structure on a per node basis. Default false

tagsClass

tagsClass: string = "badge"

Sets the class of tags to be used on a node. Defaults to 'badge'

uncheckedIcon

uncheckedIcon: string = "glyphicon glyphicon-unchecked"

Sets the icon to be as an unchecked checkbox, used in conjunction with showCheckbox.

wrapNodeText

wrapNodeText: boolean = true

Whether or not to surround the text of the node with a tag.

Object literals

ajaxConfig

ajaxConfig: object

The options to be passed to the fetch() function, when data is fetched from ajaxURL

method

method: string = "GET"

Generated using TypeDoc