# Interface FancytreeOptions

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

interface FancytreeOptions {
activeVisible ?: boolean;
ajax ?: { cache: boolean; dataType: string; type: string };
aria ?: boolean;
autoActivate ?: boolean;
autoCollapse ?: boolean;
autoScroll ?: boolean;
checkbox ?:
| string
| boolean
| ((event: JQueryEventObject , data: EventData ) => boolean);
clickFolderMode ?: FancytreeClickFolderMode ;
debugLevel ?: 0 | 1 | 2 | 3 | 4;
defaultKey ?: (node: FancytreeNode ) => string;
dnd5 ?: DragAndDrop5 ;
enableAspx ?: boolean;
enableTitles ?: boolean;
extensions ?: (keyof List)[];
filter ?: Filter ;
focusOnSelect ?: boolean;
generateIds ?: boolean;
icon ?: string | boolean;
idPrefix ?: string;
imagePath ?: string;
keyboard ?: boolean;
keyPathSeparator ?: string;
minExpandLevel ?: number;
quicksearch ?: boolean;
rtl ?: boolean;
scrollOfs ?: { bottom: number; top: number };
scrollParent ?: null | JQuery<HTMLElement>;
selectMode ?: FancytreeSelectMode ;
source ?: any;
strings ?: TranslationTable ;
tabbable ?: boolean;
table ?: Table ;
titlesTabbable ?: boolean;
toggleEffect ?: any;
tooltip ?: boolean;
unselectable ?:
| boolean
| ((event: JQueryEventObject , data: EventData ) => undefined | boolean);
unselectableIgnore ?:
| boolean
| ((event: JQueryEventObject , data: EventData ) => undefined | boolean);
unselectableStatus ?:
| boolean
| ((event: JQueryEventObject , data: EventData ) => undefined | 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;
[extension: string]: any;
}

#### Hierarchy (View Summary)

- FancytreeEvents
  - FancytreeOptions

#### Indexable

- [extension: string]: any

  Options for misc extensions - see docs for typings

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

##### Index

### Properties

activeVisible?
ajax?
aria?
autoActivate?
autoCollapse?
autoScroll?
checkbox?
clickFolderMode?
debugLevel?
defaultKey?
dnd5?
enableAspx?
enableTitles?
extensions?
filter?
focusOnSelect?
generateIds?
icon?
idPrefix?
imagePath?
keyboard?
keyPathSeparator?
minExpandLevel?
quicksearch?
rtl?
scrollOfs?
scrollParent?
selectMode?
source?
strings?
tabbable?
table?
titlesTabbable?
toggleEffect?
tooltip?
unselectable?
unselectableIgnore?
unselectableStatus?

### 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` activeVisible

activeVisible?: boolean

Make sure that the active node is always visible, i.e. its parents are expanded (default: true).

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

### `Optional` ajax

ajax?: { cache: boolean; dataType: string; type: string }

Default options for ajax requests.

#### Type declaration

- ##### cache: boolean

  false: Append random '_' argument to the request url to prevent caching.

- ##### dataType: string

  Default 'json' -> Expect json format and pass json object to callbacks.

- ##### type: string

  HTTP Method (default: 'GET')

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

### `Optional` aria

aria?: boolean

(default: false) Add WAI-ARIA attributes to markup

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

### `Optional` autoActivate

autoActivate?: boolean

Activate a node when focused with the keyboard (default: true)

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

### `Optional` autoCollapse

autoCollapse?: boolean

Automatically collapse all siblings, when a node is expanded (default: false).

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

### `Optional` autoScroll

autoScroll?: boolean

Scroll node into visible area, when focused by keyboard (default: false).

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

### `Optional` checkbox

checkbox?:
| string
| boolean
| ((event: JQueryEventObject , data: EventData ) => boolean)

Display checkboxes to allow selection (default: false)

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

### `Optional` clickFolderMode

clickFolderMode?: FancytreeClickFolderMode

Defines what happens, when the user click a folder node. (default: activate_dblclick_expands)

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

### `Optional` debugLevel

debugLevel?: 0 | 1 | 2 | 3 | 4

0..4 (null: use global setting $.ui.fancytree.debugInfo)

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

### `Optional` defaultKey

defaultKey?: (node: FancytreeNode ) => string

callback(node) is called for new nodes without a key. Must return a new unique key. (default null: generates default keys like that: "_" + counter)

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

### `Optional` dnd5

dnd5?: DragAndDrop5

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

### `Optional` enableAspx

enableAspx?: boolean

Accept passing ajax data in a property named `d` (default: true).

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

### `Optional` enableTitles

enableTitles?: boolean

Enable titles (default: false)

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

### `Optional` extensions

extensions?: (keyof List)[]

List of active extensions (default: [])

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

### `Optional` filter

filter?: Filter

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

### `Optional` focusOnSelect

focusOnSelect?: boolean

Set focus when node is checked by a mouse click (default: false)

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

### `Optional` generateIds

generateIds?: boolean

Add `id="..."` to node markup (default: true).

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

### `Optional` icon

icon?: string | boolean

Node icon url, if only filename, please use imagePath to set the path

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

### `Optional` idPrefix

idPrefix?: string

Prefix (default: "ft_")

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

### `Optional` imagePath

imagePath?: string

Path to a folder containing icons (default: null, using 'skin/' subdirectory).

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

### `Optional` keyboard

keyboard?: boolean

Support keyboard navigation (default: true).

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

### `Optional` keyPathSeparator

keyPathSeparator?: string

(default: "/")

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

### `Optional` minExpandLevel

minExpandLevel?: number

2: top-level nodes are not collapsible (default: 1)

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

### `Optional` quicksearch

quicksearch?: boolean

navigate to next node by typing the first letters (default: false)

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

### `Optional` rtl

rtl?: boolean

Right to left mode (default: false)

Overrides FancytreeEvents.rtl

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

### `Optional` scrollOfs

scrollOfs?: { bottom: number; top: number }

optional margins for node.scrollIntoView() (default: {top: 0, bottom: 0})

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

### `Optional` scrollParent

scrollParent?: null | JQuery<HTMLElement>

scrollable container for node.scrollIntoView() (default: $container)

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

### `Optional` selectMode

selectMode?: FancytreeSelectMode

default: multi_hier

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

### `Optional` source

source?: any

Used to Initialize the tree.

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

### `Optional` strings

strings?: TranslationTable

Translation table

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

### `Optional` tabbable

tabbable?: boolean

Add tabindex='0' to container, so tree can be reached using TAB

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

### `Optional` table

table?: Table

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

### `Optional` titlesTabbable

titlesTabbable?: boolean

Add tabindex='0' to node title span, so it can receive keyboard focus

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

### `Optional` toggleEffect

toggleEffect?: any

Animation options, false:off (default: { effect: "blind", options: {direction: "vertical", scale: "box"}, duration: 200 })

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

### `Optional` tooltip

tooltip?: boolean

Tooltips

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

### `Optional` unselectable

unselectable?:
| boolean
| ((event: JQueryEventObject , data: EventData ) => undefined | boolean)

(dynamic Option)Prevent (de-)selection using mouse or keyboard.

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

### `Optional` unselectableIgnore

unselectableIgnore?:
| boolean
| ((event: JQueryEventObject , data: EventData ) => undefined | boolean)

(dynamic Option)Ignore this node when calculating the partsel status of parent nodes in selectMode 3 propagation.

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

### `Optional` unselectableStatus

unselectableStatus?:
| boolean
| ((event: JQueryEventObject , data: EventData ) => undefined | boolean)

(dynamic Option)Use this as constant selected value (overriding selectMode 3 propagation).

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

## Methods

### `Optional` activate

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

  'data.node' was deactivated.

  #### Parameters

  - event: JQueryEventObject
  - data: EventData

  #### Returns void

  Inherited from FancytreeEvents.activate

  - 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

  Inherited from FancytreeEvents.beforeActivate

  - 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

  Inherited from FancytreeEvents.beforeExpand

  - 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

  Inherited from FancytreeEvents.beforeSelect

  - 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

  Inherited from FancytreeEvents.blur

  - 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

  Inherited from FancytreeEvents.blurTree

  - 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

  Inherited from FancytreeEvents.click

  - 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

  Inherited from FancytreeEvents.collapse

  - 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

  Inherited from FancytreeEvents.create

  - 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

  Inherited from FancytreeEvents.createNode

  - 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

  Inherited from FancytreeEvents.dblclick

  - 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

  Inherited from FancytreeEvents.deactivate

  - 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

  Inherited from FancytreeEvents.expand

  - 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

  Inherited from FancytreeEvents.focus

  - 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

  Inherited from FancytreeEvents.focusTree

  - 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

  Inherited from FancytreeEvents.init

  - 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

  Inherited from FancytreeEvents.keydown

  - 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

  Inherited from FancytreeEvents.keypress

  - 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

  Inherited from FancytreeEvents.lazyLoad

  - 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

  Inherited from FancytreeEvents.loadChildren

  - 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

  Inherited from FancytreeEvents.loadError

  - 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

  Inherited from FancytreeEvents.postProcess

  - 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

  Inherited from FancytreeEvents.removeNode

  - 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

  Inherited from FancytreeEvents.renderColumns

  - 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

  Inherited from FancytreeEvents.renderNode

  - 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

  Inherited from FancytreeEvents.renderTitle

  - 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

  Inherited from FancytreeEvents.restore

  - 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

  Inherited from FancytreeEvents.select

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