Node API
Introducing
This is a search result. You cannot to get an access directly. It works like in jQuery: find some node (via Query) and do some action with the found node(s).
Methods which retruns this API:
Methods
find
findAll
Description: Similar to
findmethod. But it returns all found nodes.Arguments:
query: Query
Returns:
Usage:
remove
Description: Removes matched node.
Returns:
TreeNodeTreeNode[]null
Usage:
empty
Description: It removes all children nodes. Also it removes
isBatchproperty (see Acync)Returns:
booleannull
Usage:
select
Description: Selects matched node.
Arguments:
extendSelection: boolean not required. For multiple mode adds the matched node to the list of selected items (it's like a selecting node viaCtrl)expandOnSelectboolean, not required.selectmethod will try to read this property from the tree props if expandOnSelect argument is not pass
Returns:
booleannull
Usage:
expandOnSelect example
unselect
Description: Removes Selection for matched node.
Returns:
boolean
Usage:
check
Description: Sets matched node as ticked(checked).
Returns:
boolean
Usage:
uncheck
Description: Sets matched node as not ticked(checked).
Returns:
boolean
Usage:
disable
Description: Sets matched node as disabled.
Returns:
boolean
Usage:
enable
Description: Sets matched node as enabled.
Returns:
boolean
Usage:
enableCheckbox
Description: Sets checkbox state for matched node as enabled.
Returns:
boolean
Usage:
disableCheckbox
Description: Sets checkbox state for matched node as disabled.
Returns:
boolean
Usage:
expand
Description: Expands matched node.
Arguments:
includingDisabled: boolean (default false).
Returns:
boolean
Usage:
collapse
Description: Collapses matched node.
Arguments:
includingDisabled: boolean (default false).
Returns:
boolean
Usage:
data
Description: It is getter/setter for the
dataproperty of the node.Arguments:
key: string | objectvalue: any (not required)
Returns:
undefineddata objectTreeNode
Usage:
hasClass
Description: Checks if a node has a
classNameArguments:
className: string
Returns:
boolean
Usage:
addClass
Description: It will add classNames for the node. This class will be added to the node with the class
.node-content(check Node's structure)Arguments:
Array<className>: string[]
Returns:
TreeNodeif node is found
Usage:
removeClass
Description: The same behavior as
addClassmethod, but it removes classNamesArguments:
Array<className>: string[]
Returns:
boolean
Usage:
append
Description: Inserts nodes to the end of the matched node
Arguments:
nodes: string | object | Promiseopts: Insertion options
Returns:
Promiselike<TreeNode[]>added nodes (always an array)
Usage:
prepend
Description: This method is similar to
append. But nodes inserting to the beginning of children list. (well ... you know, as well as jQuery :) )Example:
before
Description: This method is similar to
append. But nodes inserting before matched node.Example:
after
Description: This method is similar to
append. But nodes inserting after matched node.
Last updated