ItemInstance <T>
Hierarchy
- ItemInstanceType<T>
- ItemInstance
Index
Properties
- canRename
- collapse
- collapseAll
- customHandler
- deselect
- equals
- expand
- expandAll
- getCheckboxProps
- getCheckedState
- getChildren
- getElement
- getId
- getIndexInParent
- getItemAbove
- getItemBelow
- getItemData
- getItemMeta
- getItemName
- getKey
- getParent
- getProps
- getRenameInputProps
- getTree
- invalidateChildrenIds
- invalidateItemData
- isDescendentOf
- isDragTarget
- isDragTargetAbove
- isDragTargetBelow
- isDraggingOver
- isExpanded
- isFocused
- isFolder
- isLoading
- isLoadingCheckPropagation
- isMatchingSearch
- isRenaming
- isSelected
- isUnorderedDragTarget
- primaryAction
- registerElement
- scrollTo
- select
- selectUpTo
- setChecked
- setFocused
- setUnchecked
- startRenaming
- toggleCheckedState
- toggleSelect
- updateCachedChildrenIds
- updateCachedData
Properties
canRename
Type declaration
Returns boolean
collapse
Type declaration
Returns void
collapseAll
Type declaration
Returns void
customHandler
Type declaration
Parameters
param1: number
param2: number
Returns void
deselect
Type declaration
Returns void
equals
Type declaration
Parameters
optionalother: null | ItemInstance<any>
Returns boolean
expand
Type declaration
Returns void
expandAll
Type declaration
Parameters
optionalcancelToken: { current: boolean }
Returns Promise<void>
getCheckboxProps
Type declaration
Returns Record<string, any>
getCheckedState
Type declaration
Returns CheckedState
getChildren
Type declaration
Returns ItemInstance<T>[]
getElement
Type declaration
Returns undefined | null | HTMLElement
getId
Type declaration
Returns string
getIndexInParent
Type declaration
Returns number
getItemAbove
Type declaration
Returns undefined | ItemInstance<T>
getItemBelow
Type declaration
Returns undefined | ItemInstance<T>
getItemData
Type declaration
Returns T
getItemMeta
Type declaration
Returns ItemMeta
getItemName
Type declaration
Returns string
getKey
Type declaration
Returns string
getParent
Type declaration
Returns undefined | ItemInstance<T>
getProps
Type declaration
Returns Record<string, any>
getRenameInputProps
Type declaration
Returns any
getTree
Type declaration
Returns TreeInstance<T>
invalidateChildrenIds
Type declaration
Parameters
optionaloptimistic: boolean
If true, the item will not trigger a state update on
loadingItemChildrens
, and the tree will continue to display the old data until the new data has loaded.
Returns Promise<void>
invalidateItemData
Invalidate fetched data for item, and triggers a refetch and subsequent rerender if the item is visible
Type declaration
Parameters
optionaloptimistic: boolean
If true, the item will not trigger a state update on
loadingItemData
, and the tree will continue to display the old data until the new data has loaded.
Returns Promise<void>
isDescendentOf
Type declaration
Parameters
parentId: string
Returns boolean
isDragTarget
Checks if the user is dragging in a way which makes this the new parent of the dragged items, either by dragging on top of this item, or by dragging inbetween children of this item. See @{isUnorderedDragTarget} if the latter is undesirable.
Type declaration
Returns boolean
isDragTargetAbove
Type declaration
Returns boolean
isDragTargetBelow
Type declaration
Returns boolean
isDraggingOver
Type declaration
Returns boolean
isExpanded
Type declaration
Returns boolean
isFocused
Type declaration
Returns boolean
isFolder
Type declaration
Returns boolean
isLoading
isLoadingCheckPropagation
Type declaration
Returns boolean
isMatchingSearch
Type declaration
Returns boolean
isRenaming
Type declaration
Returns boolean
isSelected
Type declaration
Returns boolean
isUnorderedDragTarget
As opposed to @{isDragTarget}, this will not be true if the target is inbetween children of this item. This returns only true if the user is dragging directly on top of this item.
Type declaration
Returns boolean
primaryAction
Type declaration
Returns void
registerElement
Type declaration
Parameters
element: null | HTMLElement
Returns void
scrollTo
Type declaration
Parameters
optionalscrollIntoViewArg: boolean | ScrollIntoViewOptions
Returns Promise<void>
select
Type declaration
Returns void
selectUpTo
Type declaration
Parameters
ctrl: boolean
Returns void
setChecked
Will recursively load descendants if propagateCheckedState=true and async data loader is used. If not, this will return immediately.
Type declaration
Returns Promise<void>
setFocused
Type declaration
Returns void
setUnchecked
Will recursively load descendants if propagateCheckedState=true and async data loader is used. If not, this will return immediately.
Type declaration
Returns Promise<void>
startRenaming
Type declaration
Returns void
toggleCheckedState
Will recursively load descendants if propagateCheckedState=true and async data loader is used. If not, this will return immediately.
Type declaration
Returns Promise<void>
toggleSelect
Type declaration
Returns void
updateCachedChildrenIds
Type declaration
Parameters
childrenIds: string[]
Returns void
updateCachedData
Set to undefined to clear cache without triggering automatic refetch. Use
Type declaration
Parameters
data: undefined | T
Returns void
Invalidate fetched children ids for item, and triggers a refetch and subsequent rerender if the item is visible