Interface: TreeEnvironmentContextProps<T, C>
Type parameters
Name | Type |
---|---|
T | any |
C | extends string = never |
Hierarchy
Omit
<TreeEnvironmentConfiguration
<T
>, keyofTreeRenderProps
>AllTreeRenderProps
<T
,C
>↳
TreeEnvironmentContextProps
Properties
activeTreeId
• Optional
activeTreeId: string
Defined in
autoFocus
• Optional
autoFocus: boolean
Inherited from
Omit.autoFocus
Defined in
canDrag
• Optional
canDrag: (items
: TreeItem
<T
>[]) => boolean
Type declaration
▸ (items
): boolean
Parameters
Name | Type |
---|---|
items | TreeItem <T >[] |
Returns
boolean
Inherited from
Omit.canDrag
Defined in
canDragAndDrop
• Optional
canDragAndDrop: boolean
Inherited from
Omit.canDragAndDrop
Defined in
canDropAt
• Optional
canDropAt: (items
: TreeItem
<T
>[], target
: DraggingPosition
) => boolean
Type declaration
▸ (items
, target
): boolean
Parameters
Name | Type |
---|---|
items | TreeItem <T >[] |
target | DraggingPosition |
Returns
boolean
Inherited from
Omit.canDropAt
Defined in
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
canDropOnFolder
• Optional
canDropOnFolder: boolean
Inherited from
Omit.canDropOnFolder
Defined in
canDropOnNonFolder
• Optional
canDropOnNonFolder: boolean
Inherited from
Omit.canDropOnNonFolder
Defined in
canInvokePrimaryActionOnItemContainer
• Optional
canInvokePrimaryActionOnItemContainer: boolean
Inherited from
Omit.canInvokePrimaryActionOnItemContainer
Defined in
canRename
• Optional
canRename: boolean
Inherited from
Omit.canRename
Defined in
canReorderItems
• Optional
canReorderItems: boolean
Inherited from
Omit.canReorderItems
Defined in
canSearch
• Optional
canSearch: boolean
Inherited from
Omit.canSearch
Defined in
canSearchByStartingTyping
• Optional
canSearchByStartingTyping: boolean
Inherited from
Omit.canSearchByStartingTyping
Defined in
defaultInteractionMode
• Optional
defaultInteractionMode: InteractionMode
| InteractionManager
<never
>
Inherited from
Omit.defaultInteractionMode
Defined in
disableArrowKeys
• Optional
disableArrowKeys: boolean
Inherited from
Omit.disableArrowKeys
Defined in
doesSearchMatchItem
• Optional
doesSearchMatchItem: (search
: string
, item
: TreeItem
<T
>, itemTitle
: string
) => boolean
Type declaration
▸ (search
, item
, itemTitle
): boolean
Parameters
Name | Type |
---|---|
search | string |
item | TreeItem <T > |
itemTitle | string |
Returns
boolean
Inherited from
Omit.doesSearchMatchItem
Defined in
getItemTitle
• getItemTitle: (item
: TreeItem
<T
>) => string
Type declaration
▸ (item
): string
Parameters
Name | Type |
---|---|
item | TreeItem <T > |
Returns
string
Inherited from
Omit.getItemTitle
Defined in
items
• items: Record
<TreeItemIndex
, TreeItem
<T
>>
Inherited from
Omit.items
Defined in
keyboardBindings
• Optional
keyboardBindings: KeyboardBindings
Inherited from
Omit.keyboardBindings
Defined in
linearItems
• linearItems: Record
<string
, LinearItem
[]>
Defined in
liveDescriptors
• Optional
liveDescriptors: LiveDescriptors
Inherited from
Omit.liveDescriptors
Defined in
onAbortRenamingItem
• Optional
onAbortRenamingItem: (item
: TreeItem
<T
>, treeId
: string
) => void
Type declaration
▸ (item
, treeId
): void
Parameters
Name | Type |
---|---|
item | TreeItem <T > |
treeId | string |
Returns
void
Inherited from
Omit.onAbortRenamingItem
Defined in
onCollapseItem
• Optional
onCollapseItem: (item
: TreeItem
<T
>, treeId
: string
) => void
Type declaration
▸ (item
, treeId
): void
Parameters
Name | Type |
---|---|
item | TreeItem <T > |
treeId | string |
Returns
void
Inherited from
Omit.onCollapseItem
Defined in
onDrop
• Optional
onDrop: (items
: TreeItem
<T
>[], target
: DraggingPosition
) => void
Type declaration
▸ (items
, target
): void
Parameters
Name | Type |
---|---|
items | TreeItem <T >[] |
target | DraggingPosition |
Returns
void
Inherited from
Omit.onDrop
Defined in
onExpandItem
• Optional
onExpandItem: (item
: TreeItem
<T
>, treeId
: string
) => void
Type declaration
▸ (item
, treeId
): void
Parameters
Name | Type |
---|---|
item | TreeItem <T > |
treeId | string |
Returns
void
Inherited from
Omit.onExpandItem
Defined in
onFocusItem
• Optional
onFocusItem: (item
: TreeItem
<T
>, treeId
: string
, setDomFocus?
: boolean
) => void
Type declaration
▸ (item
, treeId
, setDomFocus?
): void
Parameters
Name | Type |
---|---|
item | TreeItem <T > |
treeId | string |
setDomFocus? | boolean |
Returns
void
Inherited from
Omit.onFocusItem
Defined in
onMissingChildren
• Optional
onMissingChildren: (itemIds
: TreeItemIndex
[]) => void
Type declaration
▸ (itemIds
): void
Parameters
Name | Type |
---|---|
itemIds | TreeItemIndex [] |
Returns
void
Inherited from
Omit.onMissingChildren
Defined in
onMissingItems
• Optional
onMissingItems: (itemIds
: TreeItemIndex
[]) => void
Type declaration
▸ (itemIds
): void
Parameters
Name | Type |
---|---|
itemIds | TreeItemIndex [] |
Returns
void
Inherited from
Omit.onMissingItems
Defined in
onPrimaryAction
• Optional
onPrimaryAction: (items
: TreeItem
<T
>, treeId
: string
) => void
Type declaration
▸ (items
, treeId
): void
Parameters
Name | Type |
---|---|
items | TreeItem <T > |
treeId | string |
Returns
void
Inherited from
Omit.onPrimaryAction
Defined in
onRegisterTree
• Optional
onRegisterTree: (tree
: TreeConfiguration
) => void
Type declaration
▸ (tree
): void
Parameters
Name | Type |
---|---|
tree | TreeConfiguration |
Returns
void
Inherited from
Omit.onRegisterTree
Defined in
onRenameItem
• Optional
onRenameItem: (item
: TreeItem
<T
>, name
: string
, treeId
: string
) => void
Type declaration
▸ (item
, name
, treeId
): void
Parameters
Name | Type |
---|---|
item | TreeItem <T > |
name | string |
treeId | string |
Returns
void
Inherited from
Omit.onRenameItem
Defined in
onSelectItems
• Optional
onSelectItems: (items
: TreeItemIndex
[], treeId
: string
) => void
Type declaration
▸ (items
, treeId
): void
Parameters
Name | Type |
---|---|
items | TreeItemIndex [] |
treeId | string |
Returns
void
Inherited from
Omit.onSelectItems
Defined in
onStartRenamingItem
• Optional
onStartRenamingItem: (item
: TreeItem
<T
>, treeId
: string
) => void
Type declaration
▸ (item
, treeId
): void
Parameters
Name | Type |
---|---|
item | TreeItem <T > |
treeId | string |
Returns
void
Inherited from
Omit.onStartRenamingItem
Defined in
onUnregisterTree
• Optional
onUnregisterTree: (tree
: TreeConfiguration
) => void
Type declaration
▸ (tree
): void
Parameters
Name | Type |
---|---|
tree | TreeConfiguration |
Returns
void
Inherited from
Omit.onUnregisterTree
Defined in
registerTree
• registerTree: (tree
: TreeConfiguration
) => void
Type declaration
▸ (tree
): void
Parameters
Name | Type |
---|---|
tree | TreeConfiguration |
Returns
void
Defined in
renderDepthOffset
• renderDepthOffset: number
Inherited from
AllTreeRenderProps.renderDepthOffset
Defined in
renderDragBetweenLine
• renderDragBetweenLine: (props
: { draggingPosition
: DraggingPosition
; lineProps
: HTMLProps
<any
> }) => null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Type declaration
▸ (props
): null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Parameters
Name | Type |
---|---|
props | Object |
props.draggingPosition | DraggingPosition |
props.lineProps | HTMLProps <any > |
Returns
null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Inherited from
AllTreeRenderProps.renderDragBetweenLine
Defined in
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
Name | Type |
---|---|
props | Object |
props.arrow | ReactNode |
props.children | ReactNode |
props.context | TreeItemRenderContext <C > |
props.depth | number |
props.info | TreeInformation |
props.item | TreeItem <T > |
props.title | ReactNode |
Returns
null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Inherited from
AllTreeRenderProps.renderItem
Defined in
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
Name | Type |
---|---|
props | Object |
props.context | TreeItemRenderContext <C > |
props.info | TreeInformation |
props.item | TreeItem <T > |
Returns
null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Inherited from
AllTreeRenderProps.renderItemArrow
Defined in
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
Name | Type |
---|---|
props | Object |
props.context | TreeItemRenderContext <C > |
props.info | TreeInformation |
props.item | TreeItem <T > |
props.title | string |
Returns
null
| string
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Inherited from
AllTreeRenderProps.renderItemTitle
Defined in
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
Name | Type |
---|---|
props | Object |
props.children | ReactNode |
props.containerProps | HTMLProps <any > |
props.depth | number |
props.info | TreeInformation |
props.parentId | TreeItemIndex |
Returns
null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Inherited from
AllTreeRenderProps.renderItemsContainer
Defined in
renderLiveDescriptorContainer
• renderLiveDescriptorContainer: (props
: { children
: ReactNode
; tree
: TreeConfiguration
}) => null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Type declaration
▸ (props
): null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Parameters
Name | Type |
---|---|
props | Object |
props.children | ReactNode |
props.tree | TreeConfiguration |
Returns
null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Inherited from
AllTreeRenderProps.renderLiveDescriptorContainer
Defined in
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
Name | Type |
---|---|
props | Object |
props.formProps | FormHTMLAttributes <HTMLFormElement > |
props.inputProps | InputHTMLAttributes <HTMLInputElement > |
props.inputRef | Ref <HTMLInputElement > |
props.item | TreeItem <T > |
props.submitButtonProps | HTMLProps <any > |
props.submitButtonRef | Ref <any > |
Returns
null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Inherited from
AllTreeRenderProps.renderRenameInput
Defined in
renderSearchInput
• renderSearchInput: (props
: { inputProps
: HTMLProps
<HTMLInputElement
> }) => null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Type declaration
▸ (props
): null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Parameters
Name | Type |
---|---|
props | Object |
props.inputProps | HTMLProps <HTMLInputElement > |
Returns
null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Inherited from
AllTreeRenderProps.renderSearchInput
Defined in
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
Name | Type |
---|---|
props | Object |
props.children | ReactNode |
props.containerProps | HTMLProps <any > |
props.info | TreeInformation |
Returns
null
| ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Inherited from
AllTreeRenderProps.renderTreeContainer
Defined in
setActiveTree
• setActiveTree: (treeIdOrSetStateFunction
: undefined
| string
| (prevState
: undefined
| string
) => undefined
| string
, autoFocus?
: boolean
) => void
Type declaration
▸ (treeIdOrSetStateFunction
, autoFocus?
): void
Parameters
Name | Type |
---|---|
treeIdOrSetStateFunction | undefined | string | (prevState : undefined | string ) => undefined | string |
autoFocus? | boolean |
Returns
void
Defined in
shouldRenderChildren
• Optional
shouldRenderChildren: (item
: TreeItem
<T
>, context
: TreeItemRenderContext
<never
>) => boolean
Type declaration
▸ (item
, context
): boolean
Parameters
Name | Type |
---|---|
item | TreeItem <T > |
context | TreeItemRenderContext <never > |
Returns
boolean
Inherited from
Omit.shouldRenderChildren
Defined in
showLiveDescription
• Optional
showLiveDescription: boolean
Inherited from
Omit.showLiveDescription
Defined in
treeIds
• treeIds: string
[]
Defined in
trees
• trees: Record
<string
, TreeConfiguration
>
Defined in
unregisterTree
• unregisterTree: (treeId
: string
) => void
Type declaration
▸ (treeId
): void
Parameters
Name | Type |
---|---|
treeId | string |
Returns
void
Defined in
viewState
• viewState: TreeViewState
<never
>
Inherited from
Omit.viewState