#

API Docs for: 3.10.3
Show: Inherited Protected Private Deprecated

# Tree.Node.Sortable Class

Defined in: `tree/js/extensions/tree-node-sortable.js:6`
Module: tree-sortable
Parent Module: tree

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

## Constructor

### `Tree.Node.Sortable`

()

Defined in `tree/js/extensions/tree-node-sortable.js:6`

- Index
- Methods

## Item Index

### Methods

- sort

## Methods

### `sort`

(

- `[options]`

)
chainable

Defined in `tree/js/extensions/tree-node-sortable.js:18`

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.