# Interface FancytreeEvents

The `this` context of any event function is set to tree's the HTMLDivElement

interface FancytreeEvents {
rtl ?: boolean;
activate (event: JQueryEventObject , data: EventData ): void;
beforeActivate (event: JQueryEventObject , data: EventData ): boolean;
beforeExpand (event: JQueryEventObject , data: EventData ): boolean;
beforeSelect (event: JQueryEventObject , data: EventData ): boolean;
blur (event: JQueryEventObject , data: EventData ): void;
blurTree (event: JQueryEventObject , data: EventData ): void;
click (event: JQueryEventObject , data: EventData ): boolean;
collapse (event: JQueryEventObject , data: EventData ): void;
create (event: JQueryEventObject , data: EventData ): void;
createNode (event: JQueryEventObject , data: EventData ): void;
dblclick (event: JQueryEventObject , data: EventData ): boolean;
deactivate (event: JQueryEventObject , data: EventData ): void;
expand (event: JQueryEventObject , data: EventData ): void;
focus (event: JQueryEventObject , data: EventData ): void;
focusTree (event: JQueryEventObject , data: EventData ): void;
init (event: JQueryEventObject , data: EventData ): void;
keydown (event: JQueryEventObject , data: EventData ): boolean;
keypress (event: JQueryEventObject , data: EventData ): void;
lazyLoad (event: JQueryEventObject , data: EventData ): void;
loadChildren (event: JQueryEventObject , data: EventData ): void;
loadError (event: JQueryEventObject , data: EventData ): boolean;
postProcess (event: JQueryEventObject , data: EventData ): void;
removeNode (event: JQueryEventObject , data: EventData ): void;
renderColumns (event: JQueryEventObject , data: EventData ): void;
renderNode (event: JQueryEventObject , data: EventData ): void;
renderTitle (event: JQueryEventObject , data: EventData ): void;
restore (event: JQueryEventObject , data: EventData ): void;
select (event: JQueryEventObject , data: EventData ): void;
}

#### Hierarchy (View Summary)

- FancytreeEvents
  - FancytreeOptions

- Defined in src/public/app/types-fancytree.d.ts:713

##### Index

### Properties

rtl?

### Methods

activate?
beforeActivate?
beforeExpand?
beforeSelect?
blur?
blurTree?
click?
collapse?
create?
createNode?
dblclick?
deactivate?
expand?
focus?
focusTree?
init?
keydown?
keypress?
lazyLoad?
loadChildren?
loadError?
postProcess?
removeNode?
renderColumns?
renderNode?
renderTitle?
restore?
select?

## Properties

### `Optional` rtl

rtl?: boolean

Enable RTL version, default is false

- Defined in src/public/app/types-fancytree.d.ts:771

## Methods

### `Optional` activate

- activate(event: JQueryEventObject , data: EventData ): void

  'data.node' was deactivated.

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:715

### `Optional` beforeActivate

- beforeActivate(event: JQueryEventObject , data: EventData ): boolean

  Return false to prevent default processing

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:717

### `Optional` beforeExpand

- beforeExpand(event: JQueryEventObject , data: EventData ): boolean

  Return `false` to prevent default processing

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:719

### `Optional` beforeSelect

- beforeSelect(event: JQueryEventObject , data: EventData ): boolean

  Return `false` to prevent default processing

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:721

### `Optional` blur

- blur(event: JQueryEventObject , data: EventData ): void

  `data.node` lost keyboard focus

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:723

### `Optional` blurTree

- blurTree(event: JQueryEventObject , data: EventData ): void

  `data.tree` lost keyboard focus

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:725

### `Optional` click

- click(event: JQueryEventObject , data: EventData ): boolean

  `data.node` was clicked. `data.targetType` contains the region ("title", "expander", ...). Return `false` to prevent default processing, i.e. activating, etc.

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:727

### `Optional` collapse

- collapse(event: JQueryEventObject , data: EventData ): void

  `data.node` was collapsed

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:729

### `Optional` create

- create(event: JQueryEventObject , data: EventData ): void

  Widget was created (called only once, even if re-initialized).

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:731

### `Optional` createNode

- createNode(event: JQueryEventObject , data: EventData ): void

  Allow tweaking and binding, after node was created for the first time (NOTE: this event is only available as callback, but not for bind())

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:733

### `Optional` dblclick

- dblclick(event: JQueryEventObject , data: EventData ): boolean

  `data.node` was double-clicked. `data.targetType` contains the region ("title", "expander", ...). Return `false` to prevent default processing, i.e. expanding, etc.

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:735

### `Optional` deactivate

- deactivate(event: JQueryEventObject , data: EventData ): void

  `data.node` was deactivated

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:737

### `Optional` expand

- expand(event: JQueryEventObject , data: EventData ): void

  `data.node` was expanded

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:739

### `Optional` focus

- focus(event: JQueryEventObject , data: EventData ): void

  `data.node` received keyboard focus

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:741

### `Optional` focusTree

- focusTree(event: JQueryEventObject , data: EventData ): void

  `data.tree` received keyboard focus

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:743

### `Optional` init

- init(event: JQueryEventObject , data: EventData ): void

  Widget was (re-)initialized.

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:745

### `Optional` keydown

- keydown(event: JQueryEventObject , data: EventData ): boolean

  `data.node` received key. `event.which` contains the key. Return `false` to prevent default processing, i.e. navigation. Call `data.result = "preventNav";` to prevent navigation but still allow default handling inside embedded input controls.

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:747

### `Optional` keypress

- keypress(event: JQueryEventObject , data: EventData ): void

  (currently unused)

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:749

### `Optional` lazyLoad

- lazyLoad(event: JQueryEventObject , data: EventData ): void

  `data.node` is a lazy node that is expanded for the first time. The new child data must be returned in the `data.result` property (see `source` option for available formats).

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:751

### `Optional` loadChildren

- loadChildren(event: JQueryEventObject , data: EventData ): void

  Node data was loaded, i.e. `node.nodeLoadChildren()` finished

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:753

### `Optional` loadError

- loadError(event: JQueryEventObject , data: EventData ): boolean

  A load error occured. Return `false` to prevent default processing.

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:755

### `Optional` postProcess

- postProcess(event: JQueryEventObject , data: EventData ): void

  Allows to modify the ajax response.

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:757

### `Optional` removeNode

- removeNode(event: JQueryEventObject , data: EventData ): void

  `data.node` was removed (NOTE: this event is only available as callback, but not for bind())

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:759

### `Optional` renderColumns

- renderColumns(event: JQueryEventObject , data: EventData ): void

  (used by table extension)

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:761

### `Optional` renderNode

- renderNode(event: JQueryEventObject , data: EventData ): void

  Allow tweaking after node state was rendered (NOTE: this event is only available as callback, but not for bind())

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:763

### `Optional` renderTitle

- renderTitle(event: JQueryEventObject , data: EventData ): void

  Allow replacing the `<span class='fancytree-title'>` markup (NOTE: this event is only available as callback, but not for bind())

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:765

### `Optional` restore

- restore(event: JQueryEventObject , data: EventData ): void

  ext-persist has expanded, selected, and activated the previous state

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:767

### `Optional` select

- select(event: JQueryEventObject , data: EventData ): void

  `data.node` was selected

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:769