Skip to main content

Interface: TreeEnvironmentRef<T, C>

Type parameters

NameType
Tany
Cextends string = never

Hierarchy

Properties

abortProgrammaticDrag

abortProgrammaticDrag: () => void

Type declaration

▸ (): void

Returns

void

Inherited from

TreeEnvironmentChangeActions.abortProgrammaticDrag

Defined in

types.ts:260


activeTreeId

Optional activeTreeId: string

Defined in

types.ts:279


autoFocus

Optional autoFocus: boolean

Inherited from

Omit.autoFocus

Defined in

types.ts:174


canDrag

Optional canDrag: (items: TreeItem<T>[]) => boolean

Type declaration

▸ (items): boolean

Parameters
NameType
itemsTreeItem<T>[]
Returns

boolean

Inherited from

Omit.canDrag

Defined in

types.ts:168


canDragAndDrop

Optional canDragAndDrop: boolean

Inherited from

Omit.canDragAndDrop

Defined in

types.ts:164


canDropAt

Optional canDropAt: (items: TreeItem<T>[], target: DraggingPosition) => boolean

Type declaration

▸ (items, target): boolean

Parameters
NameType
itemsTreeItem<T>[]
targetDraggingPosition
Returns

boolean

Inherited from

Omit.canDropAt

Defined in

types.ts:169


canDropBelowOpenFolders

Optional canDropBelowOpenFolders: boolean

See Issue #148 or the sample at https://rct.lukasbach.com/storybook/?path=/story/core-basic-examples--single-tree?path=/story/core-drag-and-drop-configurability--can-drop-below-open-folders for details.

If enabled, dropping at the bottom of an open folder will drop the items in the parent folder below the hovered item instead of inside the folder at the top.

Inherited from

Omit.canDropBelowOpenFolders

Defined in

types.ts:195


canDropOnFolder

Optional canDropOnFolder: boolean

Inherited from

Omit.canDropOnFolder

Defined in

types.ts:165


canDropOnNonFolder

Optional canDropOnNonFolder: boolean

Inherited from

Omit.canDropOnNonFolder

Defined in

types.ts:166


canInvokePrimaryActionOnItemContainer

Optional canInvokePrimaryActionOnItemContainer: boolean

Inherited from

Omit.canInvokePrimaryActionOnItemContainer

Defined in

types.ts:170


canRename

Optional canRename: boolean

Inherited from

Omit.canRename

Defined in

types.ts:173


canReorderItems

Optional canReorderItems: boolean

Inherited from

Omit.canReorderItems

Defined in

types.ts:167


canSearch

Optional canSearch: boolean

Inherited from

Omit.canSearch

Defined in

types.ts:171


canSearchByStartingTyping

Optional canSearchByStartingTyping: boolean

Inherited from

Omit.canSearchByStartingTyping

Defined in

types.ts:172


collapseAll

collapseAll: (treeId: string) => void

Type declaration

▸ (treeId): void

Parameters
NameType
treeIdstring
Returns

void

Inherited from

TreeEnvironmentChangeActions.collapseAll

Defined in

types.ts:265


collapseItem

collapseItem: (itemId: TreeItemIndex, treeId: string) => void

Type declaration

▸ (itemId, treeId): void

Parameters
NameType
itemIdTreeItemIndex
treeIdstring
Returns

void

Inherited from

TreeEnvironmentChangeActions.collapseItem

Defined in

types.ts:243


completeProgrammaticDrag

completeProgrammaticDrag: () => void

Type declaration

▸ (): void

Returns

void

Inherited from

TreeEnvironmentChangeActions.completeProgrammaticDrag

Defined in

types.ts:261


defaultInteractionMode

Optional defaultInteractionMode: InteractionMode | InteractionManager<never>

Inherited from

Omit.defaultInteractionMode

Defined in

types.ts:163


disableArrowKeys

Optional disableArrowKeys: boolean

Inherited from

Omit.disableArrowKeys

Defined in

types.ts:197


doesSearchMatchItem

Optional doesSearchMatchItem: (search: string, item: TreeItem<T>, itemTitle: string) => boolean

Type declaration

▸ (search, item, itemTitle): boolean

Parameters
NameType
searchstring
itemTreeItem<T>
itemTitlestring
Returns

boolean

Inherited from

Omit.doesSearchMatchItem

Defined in

types.ts:175


dragAndDropContext

dragAndDropContext: DragAndDropContextProps<any>

Defined in

types.ts:278


expandAll

expandAll: (treeId: string) => void

Type declaration

▸ (treeId): void

Parameters
NameType
treeIdstring
Returns

void

Inherited from

TreeEnvironmentChangeActions.expandAll

Defined in

types.ts:264


expandItem

expandItem: (itemId: TreeItemIndex, treeId: string) => void

Type declaration

▸ (itemId, treeId): void

Parameters
NameType
itemIdTreeItemIndex
treeIdstring
Returns

void

Inherited from

TreeEnvironmentChangeActions.expandItem

Defined in

types.ts:244


expandSubsequently

expandSubsequently: (treeId: string, itemIds: TreeItemIndex[]) => Promise<void>

Type declaration

▸ (treeId, itemIds): Promise<void>

Parameters
NameType
treeIdstring
itemIdsTreeItemIndex[]
Returns

Promise<void>

Inherited from

TreeEnvironmentChangeActions.expandSubsequently

Defined in

types.ts:266


focusItem

focusItem: (itemId: TreeItemIndex, treeId: string, setDomFocus?: boolean) => void

Type declaration

▸ (itemId, treeId, setDomFocus?): void

Parameters
NameTypeDescription
itemIdTreeItemIndex-
treeIdstring-
setDomFocus?booleanDefaults to true.
Returns

void

Inherited from

TreeEnvironmentChangeActions.focusItem

Defined in

types.ts:251


focusTree

focusTree: (treeId: string, autoFocus?: boolean) => void

Type declaration

▸ (treeId, autoFocus?): void

Parameters
NameType
treeIdstring
autoFocus?boolean
Returns

void

Inherited from

TreeEnvironmentChangeActions.focusTree

Defined in

types.ts:241


getItemTitle

getItemTitle: (item: TreeItem<T>) => string

Type declaration

▸ (item): string

Parameters
NameType
itemTreeItem<T>
Returns

string

Inherited from

Omit.getItemTitle

Defined in

types.ts:292


invokePrimaryAction

invokePrimaryAction: (itemId: TreeItemIndex, treeID: string) => void

Type declaration

▸ (itemId, treeID): void

Parameters
NameType
itemIdTreeItemIndex
treeIDstring
Returns

void

Inherited from

TreeEnvironmentChangeActions.invokePrimaryAction

Defined in

types.ts:248


items

items: Record<TreeItemIndex, TreeItem<T>>

Inherited from

Omit.items

Defined in

types.ts:211


keyboardBindings

Optional keyboardBindings: KeyboardBindings

Inherited from

Omit.keyboardBindings

Defined in

types.ts:290


liveDescriptors

Optional liveDescriptors: LiveDescriptors

Inherited from

Omit.liveDescriptors

Defined in

types.ts:291


moveFocusDown

moveFocusDown: (treeId: string) => void

Type declaration

▸ (treeId): void

Parameters
NameType
treeIdstring
Returns

void

Inherited from

TreeEnvironmentChangeActions.moveFocusDown

Defined in

types.ts:258


moveFocusUp

moveFocusUp: (treeId: string) => void

Type declaration

▸ (treeId): void

Parameters
NameType
treeIdstring
Returns

void

Inherited from

TreeEnvironmentChangeActions.moveFocusUp

Defined in

types.ts:257


moveProgrammaticDragPositionDown

moveProgrammaticDragPositionDown: () => void

Type declaration

▸ (): void

Returns

void

Inherited from

TreeEnvironmentChangeActions.moveProgrammaticDragPositionDown

Defined in

types.ts:263


moveProgrammaticDragPositionUp

moveProgrammaticDragPositionUp: () => void

Type declaration

▸ (): void

Returns

void

Inherited from

TreeEnvironmentChangeActions.moveProgrammaticDragPositionUp

Defined in

types.ts:262


renameItem

renameItem: (itemId: TreeItemIndex, name: string, treeId: string) => void

Type declaration

▸ (itemId, name, treeId): void

Parameters
NameType
itemIdTreeItemIndex
namestring
treeIdstring
Returns

void

Inherited from

TreeEnvironmentChangeActions.renameItem

Defined in

types.ts:242


renderDepthOffset

Optional renderDepthOffset: number

Inherited from

Omit.renderDepthOffset

Defined in

types.ts:136


renderDragBetweenLine

Optional renderDragBetweenLine: (props: { draggingPosition: DraggingPosition ; lineProps: HTMLProps<any> }) => null | ReactElement<any, string | JSXElementConstructor<any>>

Type declaration

▸ (props): null | ReactElement<any, string | JSXElementConstructor<any>>

Parameters
NameType
propsObject
props.draggingPositionDraggingPosition
props.linePropsHTMLProps<any>
Returns

null | ReactElement<any, string | JSXElementConstructor<any>>

Inherited from

Omit.renderDragBetweenLine

Defined in

types.ts:122


renderItem

Optional renderItem: (props: { arrow: ReactNode ; children: ReactNode ; context: TreeItemRenderContext<C> ; depth: number ; info: TreeInformation ; item: TreeItem<T> ; title: ReactNode }) => null | ReactElement<any, string | JSXElementConstructor<any>>

Type declaration

▸ (props): null | ReactElement<any, string | JSXElementConstructor<any>>

Parameters
NameType
propsObject
props.arrowReactNode
props.childrenReactNode
props.contextTreeItemRenderContext<C>
props.depthnumber
props.infoTreeInformation
props.itemTreeItem<T>
props.titleReactNode
Returns

null | ReactElement<any, string | JSXElementConstructor<any>>

Inherited from

Omit.renderItem

Defined in

types.ts:76


renderItemArrow

Optional renderItemArrow: (props: { context: TreeItemRenderContext<C> ; info: TreeInformation ; item: TreeItem<T> }) => null | ReactElement<any, string | JSXElementConstructor<any>>

Type declaration

▸ (props): null | ReactElement<any, string | JSXElementConstructor<any>>

Parameters
NameType
propsObject
props.contextTreeItemRenderContext<C>
props.infoTreeInformation
props.itemTreeItem<T>
Returns

null | ReactElement<any, string | JSXElementConstructor<any>>

Inherited from

Omit.renderItemArrow

Defined in

types.ts:93


renderItemTitle

Optional renderItemTitle: (props: { context: TreeItemRenderContext<C> ; info: TreeInformation ; item: TreeItem<T> ; title: string }) => null | string | ReactElement<any, string | JSXElementConstructor<any>>

Type declaration

▸ (props): null | string | ReactElement<any, string | JSXElementConstructor<any>>

Parameters
NameType
propsObject
props.contextTreeItemRenderContext<C>
props.infoTreeInformation
props.itemTreeItem<T>
props.titlestring
Returns

null | string | ReactElement<any, string | JSXElementConstructor<any>>

Inherited from

Omit.renderItemTitle

Defined in

types.ts:86


renderItemsContainer

Optional renderItemsContainer: (props: { children: ReactNode ; containerProps: HTMLProps<any> ; depth: number ; info: TreeInformation ; parentId: TreeItemIndex }) => null | ReactElement<any, string | JSXElementConstructor<any>>

Type declaration

▸ (props): null | ReactElement<any, string | JSXElementConstructor<any>>

Parameters
NameType
propsObject
props.childrenReactNode
props.containerPropsHTMLProps<any>
props.depthnumber
props.infoTreeInformation
props.parentIdTreeItemIndex
Returns

null | ReactElement<any, string | JSXElementConstructor<any>>

Inherited from

Omit.renderItemsContainer

Defined in

types.ts:108


renderLiveDescriptorContainer

Optional renderLiveDescriptorContainer: (props: { children: ReactNode ; tree: TreeConfiguration }) => null | ReactElement<any, string | JSXElementConstructor<any>>

Type declaration

▸ (props): null | ReactElement<any, string | JSXElementConstructor<any>>

Parameters
NameType
propsObject
props.childrenReactNode
props.treeTreeConfiguration
Returns

null | ReactElement<any, string | JSXElementConstructor<any>>

Inherited from

Omit.renderLiveDescriptorContainer

Defined in

types.ts:131


renderRenameInput

Optional renderRenameInput: (props: { formProps: FormHTMLAttributes<HTMLFormElement> ; inputProps: InputHTMLAttributes<HTMLInputElement> ; inputRef: Ref<HTMLInputElement> ; item: TreeItem<T> ; submitButtonProps: HTMLProps<any> ; submitButtonRef: Ref<any> }) => null | ReactElement<any, string | JSXElementConstructor<any>>

Type declaration

▸ (props): null | ReactElement<any, string | JSXElementConstructor<any>>

Parameters
NameType
propsObject
props.formPropsFormHTMLAttributes<HTMLFormElement>
props.inputPropsInputHTMLAttributes<HTMLInputElement>
props.inputRefRef<HTMLInputElement>
props.itemTreeItem<T>
props.submitButtonPropsHTMLProps<any>
props.submitButtonRefRef<any>
Returns

null | ReactElement<any, string | JSXElementConstructor<any>>

Inherited from

Omit.renderRenameInput

Defined in

types.ts:99


renderSearchInput

Optional renderSearchInput: (props: { inputProps: HTMLProps<HTMLInputElement> }) => null | ReactElement<any, string | JSXElementConstructor<any>>

Type declaration

▸ (props): null | ReactElement<any, string | JSXElementConstructor<any>>

Parameters
NameType
propsObject
props.inputPropsHTMLProps<HTMLInputElement>
Returns

null | ReactElement<any, string | JSXElementConstructor<any>>

Inherited from

Omit.renderSearchInput

Defined in

types.ts:127


renderTreeContainer

Optional renderTreeContainer: (props: { children: ReactNode ; containerProps: HTMLProps<any> ; info: TreeInformation }) => null | ReactElement<any, string | JSXElementConstructor<any>>

Type declaration

▸ (props): null | ReactElement<any, string | JSXElementConstructor<any>>

Parameters
NameType
propsObject
props.childrenReactNode
props.containerPropsHTMLProps<any>
props.infoTreeInformation
Returns

null | ReactElement<any, string | JSXElementConstructor<any>>

Inherited from

Omit.renderTreeContainer

Defined in

types.ts:116


selectItems

selectItems: (itemsIds: TreeItemIndex[], treeId: string) => void

Type declaration

▸ (itemsIds, treeId): void

Parameters
NameType
itemsIdsTreeItemIndex[]
treeIdstring
Returns

void

Inherited from

TreeEnvironmentChangeActions.selectItems

Defined in

types.ts:246


shouldRenderChildren

Optional shouldRenderChildren: (item: TreeItem<T>, context: TreeItemRenderContext<never>) => boolean

Type declaration

▸ (item, context): boolean

Parameters
NameType
itemTreeItem<T>
contextTreeItemRenderContext<never>
Returns

boolean

Inherited from

Omit.shouldRenderChildren

Defined in

types.ts:181


showLiveDescription

Optional showLiveDescription: boolean

Inherited from

Omit.showLiveDescription

Defined in

types.ts:180


startProgrammaticDrag

startProgrammaticDrag: () => void

Type declaration

▸ (): void

Returns

void

Inherited from

TreeEnvironmentChangeActions.startProgrammaticDrag

Defined in

types.ts:259


toggleItemExpandedState

toggleItemExpandedState: (itemId: TreeItemIndex, treeId: string) => void

Type declaration

▸ (itemId, treeId): void

Parameters
NameType
itemIdTreeItemIndex
treeIdstring
Returns

void

Inherited from

TreeEnvironmentChangeActions.toggleItemExpandedState

Defined in

types.ts:245


toggleItemSelectStatus

toggleItemSelectStatus: (itemId: TreeItemIndex, treeId: string) => void

Type declaration

▸ (itemId, treeId): void

Parameters
NameType
itemIdTreeItemIndex
treeIdstring
Returns

void

Inherited from

TreeEnvironmentChangeActions.toggleItemSelectStatus

Defined in

types.ts:247


treeEnvironmentContext

treeEnvironmentContext: TreeEnvironmentContextProps<any, never>

Defined in

types.ts:277


treeIds

treeIds: string[]

Defined in

types.ts:280


trees

trees: Record<string, TreeConfiguration>

Defined in

types.ts:281


viewState

viewState: TreeViewState<C>

Inherited from

Omit.viewState

Defined in

types.ts:289