#

API Docs for: 3.10.3
Show: Inherited Protected Private Deprecated

# Tree.Node.Openable Class

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

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

## Constructor

### `Tree.Node.Openable`

()

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

- Index
- Methods

## Item Index

### Methods

- close
- isOpen
- open
- toggleOpen

## Methods

### `close`

(

- `[options]`

)
chainable

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

Closes this node if it's currently open.

#### Parameters:

- `[options]` Object optional

  Options.

  - `[silent=false]` Boolean optional

    If `true`, the `close` event will be suppressed.

  - `[src]` String optional

    Source of the change, to be passed along to the event facade of the resulting event. This can be used to distinguish between changes triggered by a user and changes triggered programmatically, for example.

### `isOpen`

() Boolean

Defined in `tree/js/extensions/tree-node-openable.js:36`

Returns `true` if this node is currently open.

Note: the root node of a tree is always considered to be open.

#### Returns:

Boolean: `true` if this node is currently open, `false` otherwise.

### `open`

(

- `[options]`

)
chainable

Defined in `tree/js/extensions/tree-node-openable.js:48`

Opens this node if it's currently closed.

#### Parameters:

- `[options]` Object optional

  Options.

  - `[silent=false]` Boolean optional

    If `true`, the `open` event will be suppressed.

  - `[src]` String optional

    Source of the change, to be passed along to the event facade of the resulting event. This can be used to distinguish between changes triggered by a user and changes triggered programmatically, for example.

### `toggleOpen`

(

- `[options]`

)
chainable

Defined in `tree/js/extensions/tree-node-openable.js:66`

Toggles the open/closed state of this node, closing it if it's currently open or opening it if it's currently closed.

#### Parameters:

- `[options]` Object optional

  Options.

  - `[silent=false]` Boolean optional

    If `true`, events will be suppressed.

  - `[src]` String optional

    Source of the change, to be passed along to the event facade of the resulting event. This can be used to distinguish between changes triggered by a user and changes triggered programmatically, for example.