TreeConfig <T>
Hierarchy
- TreeConfigType<T>
- TreeConfig
Index
Properties
- canCheckFolders
- canDrag
- canDragForeignDragObjectOver
- canDrop
- canDropForeignDragObject
- canRename
- canReorder
- createForeignDragObject
- createLoadingItemData
- dataLoader
- features
- getItemName
- hotkeys
- ignoreHotkeysOnInputs
- indent
- initialState
- instanceBuilder
- isItemFolder
- isSearchMatchingItem
- onCloseSearch
- onCompleteForeignDrop
- onDrop
- onDropForeignDragObject
- onLoadedChildren
- onLoadedItem
- onOpenSearch
- onPrimaryAction
- onRename
- onStartKeyboardDrag
- onTreeHotkey
- openOnDropDelay
- propagateCheckedState
- reorderAreaPercentage
- rootItemId
- scrollToItem
- setAssistiveDndState
- setCheckedItems
- setDndState
- setDragImage
- setExpandedItems
- setFocusedItem
- setLoadingCheckPropagationItems
- setLoadingItemChildrens
- setLoadingItemData
- setRenamingItem
- setRenamingValue
- setSearch
- setSelectedItems
- setState
- state
Properties
optionalcanCheckFolders
optionalcanDrag
Type declaration
Parameters
items: ItemInstance<T>[]
Returns boolean
optionalcanDragForeignDragObjectOver
Type declaration
Parameters
dataTransfer: DataTransfer
target: DragTarget<T>
Returns boolean
optionalcanDrop
Type declaration
Parameters
items: ItemInstance<T>[]
target: DragTarget<T>
Returns boolean
optionalcanDropForeignDragObject
Checks if a foreign drag object can be dropped on a target, validating that an actual drop can commence based on the data in the DataTransfer object.
Type declaration
Parameters
dataTransfer: DataTransfer
target: DragTarget<T>
Returns boolean
optionalcanRename
Type declaration
Parameters
item: ItemInstance<T>
Returns boolean
optionalcanReorder
optionalcreateForeignDragObject
Type declaration
Parameters
items: ItemInstance<T>[]
Returns { data: any; dropEffect?: none | copy | link | move; effectAllowed?: none | copy | link | move | copyLink | copyMove | linkMove | all | uninitialized; format: string }
data: any
optionaldropEffect?: none | copy | link | move
optionaleffectAllowed?: none | copy | link | move | copyLink | copyMove | linkMove | all | uninitialized
format: string
optionalcreateLoadingItemData
Will be called when HT retrieves item data for an item whose item data is asynchronously being loaded. Can be used to create placeholder data to use for rendering the tree item while it is loaded. If not defined, the tree item data will be null.
Type declaration
Returns T
dataLoader
optionalfeatures
getItemName
Type declaration
Parameters
item: ItemInstance<T>
Returns string
optionalhotkeys
optionalignoreHotkeysOnInputs
Do not handle key inputs while an HTML input element is focused
optionalindent
optionalinitialState
optionalinstanceBuilder
isItemFolder
Type declaration
Parameters
item: ItemInstance<T>
Returns boolean
optionalisSearchMatchingItem
Type declaration
Parameters
search: string
item: ItemInstance<T>
Returns boolean
optionalonCloseSearch
Type declaration
Returns void
optionalonCompleteForeignDrop
Type declaration
Parameters
items: ItemInstance<T>[]
Returns void
optionalonDrop
Type declaration
Parameters
items: ItemInstance<T>[]
target: DragTarget<T>
Returns void | Promise<void>
optionalonDropForeignDragObject
Type declaration
Parameters
dataTransfer: DataTransfer
target: DragTarget<T>
Returns void | Promise<void>
optionalonLoadedChildren
Type declaration
Parameters
itemId: string
childrenIds: string[]
Returns void
optionalonLoadedItem
Type declaration
Parameters
itemId: string
item: T
Returns void
optionalonOpenSearch
Type declaration
Returns void
optionalonPrimaryAction
Type declaration
Parameters
item: ItemInstance<T>
Returns void
optionalonRename
Type declaration
Parameters
item: ItemInstance<T>
value: string
Returns void
optionalonStartKeyboardDrag
Type declaration
Parameters
items: ItemInstance<T>[]
Returns void
optionalonTreeHotkey
Type declaration
Parameters
name: string
e: KeyboardEvent
Returns void
optionalopenOnDropDelay
When dragging for this many ms on a closed folder, the folder will automatically open. Set to zero to disable.
optionalpropagateCheckedState
optionalreorderAreaPercentage
Defines the size of the area at the top and bottom of an item where, when an item is dropped, the item willö
be placed above or below the item within the same parent, as opposed to being placed inside the item.
If canReorder
is false
, this is ignored.
rootItemId
optionalscrollToItem
Type declaration
Parameters
item: ItemInstance<T>
Returns void
optionalsetAssistiveDndState
optionalsetCheckedItems
optionalsetDndState
optionalsetDragImage
Type declaration
Parameters
items: ItemInstance<T>[]
Returns { imgElement: Element; xOffset?: number; yOffset?: number }
imgElement: Element
optionalxOffset?: number
optionalyOffset?: number
Checks if a droppable visualization should be displayed when dragging a foreign object over a target. Since this is executed on a dragover event,
dataTransfer.getData()
is not available, sodataTransfer.effectAllowed
ordataTransfer.types
should be used instead. Before actually completing the drag, @{link canDropForeignDragObject} will be called by HT before applying the drop.