Show:

Tree.Node extension that adds methods useful for nodes in trees that use the Tree.Sortable extension.

Constructor

Tree.Node.Sortable

()

Index

Methods

Methods

sort

(
  • [options]
)
chainable

Sorts this node's children.

Parameters:

  • [options] Object optional

    Options.

    • [silent] Boolean optional

      If true, no sort event will be fired.

    • [sortComparator] Function optional

      Custom comparator function to use. If specified, this will become the node's new comparator function, overwriting any previous comparator function that was set for the node.

    • [sortReverse] Boolean optional

      If true, children will be sorted in reverse (descending) order. Otherwise they'll be sorted in ascending order. This will become the node's new sort order, overwriting any previous sort order that was set for the node.

    • [src] String optional

      Source of the sort operation. Will be passed along to the sort event facade.