Skip to main content

Interface: TreeEnvironmentContextProps<T, C>

Type parameters

NameType
Tany
Cextends string = never

Hierarchy

Properties

activeTreeId

Optional activeTreeId: string

Defined in

types.ts:300


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


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


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


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


linearItems

linearItems: Record<string, LinearItem[]>

Defined in

types.ts:310


liveDescriptors

Optional liveDescriptors: LiveDescriptors

Inherited from

Omit.liveDescriptors

Defined in

types.ts:291


onAbortRenamingItem

Optional onAbortRenamingItem: (item: TreeItem<T>, treeId: string) => void

Type declaration

▸ (item, treeId): void

Parameters
NameType
itemTreeItem<T>
treeIdstring
Returns

void

Inherited from

Omit.onAbortRenamingItem

Defined in

types.ts:223


onCollapseItem

Optional onCollapseItem: (item: TreeItem<T>, treeId: string) => void

Type declaration

▸ (item, treeId): void

Parameters
NameType
itemTreeItem<T>
treeIdstring
Returns

void

Inherited from

Omit.onCollapseItem

Defined in

types.ts:224


onDrop

Optional onDrop: (items: TreeItem<T>[], target: DraggingPosition) => void

Type declaration

▸ (items, target): void

Parameters
NameType
itemsTreeItem<T>[]
targetDraggingPosition
Returns

void

Inherited from

Omit.onDrop

Defined in

types.ts:232


onExpandItem

Optional onExpandItem: (item: TreeItem<T>, treeId: string) => void

Type declaration

▸ (item, treeId): void

Parameters
NameType
itemTreeItem<T>
treeIdstring
Returns

void

Inherited from

Omit.onExpandItem

Defined in

types.ts:225


onFocusItem

Optional onFocusItem: (item: TreeItem<T>, treeId: string, setDomFocus?: boolean) => void

Type declaration

▸ (item, treeId, setDomFocus?): void

Parameters
NameType
itemTreeItem<T>
treeIdstring
setDomFocus?boolean
Returns

void

Inherited from

Omit.onFocusItem

Defined in

types.ts:227


onMissingChildren

Optional onMissingChildren: (itemIds: TreeItemIndex[]) => void

Type declaration

▸ (itemIds): void

Parameters
NameType
itemIdsTreeItemIndex[]
Returns

void

Inherited from

Omit.onMissingChildren

Defined in

types.ts:237


onMissingItems

Optional onMissingItems: (itemIds: TreeItemIndex[]) => void

Type declaration

▸ (itemIds): void

Parameters
NameType
itemIdsTreeItemIndex[]
Returns

void

Inherited from

Omit.onMissingItems

Defined in

types.ts:236


onPrimaryAction

Optional onPrimaryAction: (items: TreeItem<T>, treeId: string) => void

Type declaration

▸ (items, treeId): void

Parameters
NameType
itemsTreeItem<T>
treeIdstring
Returns

void

Inherited from

Omit.onPrimaryAction

Defined in

types.ts:233


onRegisterTree

Optional onRegisterTree: (tree: TreeConfiguration) => void

Type declaration

▸ (tree): void

Parameters
NameType
treeTreeConfiguration
Returns

void

Inherited from

Omit.onRegisterTree

Defined in

types.ts:234


onRenameItem

Optional onRenameItem: (item: TreeItem<T>, name: string, treeId: string) => void

Type declaration

▸ (item, name, treeId): void

Parameters
NameType
itemTreeItem<T>
namestring
treeIdstring
Returns

void

Inherited from

Omit.onRenameItem

Defined in

types.ts:222


onSelectItems

Optional onSelectItems: (items: TreeItemIndex[], treeId: string) => void

Type declaration

▸ (items, treeId): void

Parameters
NameType
itemsTreeItemIndex[]
treeIdstring
Returns

void

Inherited from

Omit.onSelectItems

Defined in

types.ts:226


onStartRenamingItem

Optional onStartRenamingItem: (item: TreeItem<T>, treeId: string) => void

Type declaration

▸ (item, treeId): void

Parameters
NameType
itemTreeItem<T>
treeIdstring
Returns

void

Inherited from

Omit.onStartRenamingItem

Defined in

types.ts:221


onUnregisterTree

Optional onUnregisterTree: (tree: TreeConfiguration) => void

Type declaration

▸ (tree): void

Parameters
NameType
treeTreeConfiguration
Returns

void

Inherited from

Omit.onUnregisterTree

Defined in

types.ts:235


registerTree

registerTree: (tree: TreeConfiguration) => void

Type declaration

▸ (tree): void

Parameters
NameType
treeTreeConfiguration
Returns

void

Defined in

types.ts:298


renderDepthOffset

renderDepthOffset: number

Inherited from

AllTreeRenderProps.renderDepthOffset

Defined in

types.ts:136


renderDragBetweenLine

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

AllTreeRenderProps.renderDragBetweenLine

Defined in

types.ts:122


renderItem

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

AllTreeRenderProps.renderItem

Defined in

types.ts:76


renderItemArrow

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

AllTreeRenderProps.renderItemArrow

Defined in

types.ts:93


renderItemTitle

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

AllTreeRenderProps.renderItemTitle

Defined in

types.ts:86


renderItemsContainer

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

AllTreeRenderProps.renderItemsContainer

Defined in

types.ts:108


renderLiveDescriptorContainer

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

AllTreeRenderProps.renderLiveDescriptorContainer

Defined in

types.ts:131


renderRenameInput

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

AllTreeRenderProps.renderRenameInput

Defined in

types.ts:99


renderSearchInput

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

AllTreeRenderProps.renderSearchInput

Defined in

types.ts:127


renderTreeContainer

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

AllTreeRenderProps.renderTreeContainer

Defined in

types.ts:116


setActiveTree

setActiveTree: (treeIdOrSetStateFunction: undefined | string | (prevState: undefined | string) => undefined | string, autoFocus?: boolean) => void

Type declaration

▸ (treeIdOrSetStateFunction, autoFocus?): void

Parameters
NameType
treeIdOrSetStateFunctionundefined | string | (prevState: undefined | string) => undefined | string
autoFocus?boolean
Returns

void

Defined in

types.ts:301


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


treeIds

treeIds: string[]

Defined in

types.ts:308


trees

trees: Record<string, TreeConfiguration>

Defined in

types.ts:309


unregisterTree

unregisterTree: (treeId: string) => void

Type declaration

▸ (treeId): void

Parameters
NameType
treeIdstring
Returns

void

Defined in

types.ts:299


viewState

viewState: TreeViewState<never>

Inherited from

Omit.viewState

Defined in

types.ts:289