Skip to main content

ItemInstance <T>

Hierarchy

  • ItemInstanceType<T>
    • ItemInstance

Index

Properties

canRename

canRename: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

collapse

collapse: () => void

Type declaration

    • (): void
    • Returns void

collapseAll

collapseAll: () => void

Type declaration

    • (): void
    • Returns void

customHandler

customHandler: (param1: number, param2: number) => void

Type declaration

    • (param1: number, param2: number): void
    • Parameters

      • param1: number
      • param2: number

      Returns void

deselect

deselect: () => void

Type declaration

    • (): void
    • Returns void

equals

equals: (other?: null | ItemInstance<any>) => boolean

Type declaration

expand

expand: () => void

Type declaration

    • (): void
    • Returns void

expandAll

expandAll: (cancelToken?: { current: boolean }) => Promise<void>

Type declaration

    • (cancelToken?: { current: boolean }): Promise<void>
    • Parameters

      • optionalcancelToken: { current: boolean }

      Returns Promise<void>

getChildren

getChildren: () => ItemInstance<T>[]

Type declaration

getElement

getElement: () => undefined | null | HTMLElement

Type declaration

    • (): undefined | null | HTMLElement
    • Returns undefined | null | HTMLElement

getId

getId: () => string

Type declaration

    • (): string
    • Returns string

getIndexInParent

getIndexInParent: () => number

Type declaration

    • (): number
    • Returns number

getItemAbove

getItemAbove: () => undefined | ItemInstance<T>

Type declaration

getItemBelow

getItemBelow: () => undefined | ItemInstance<T>

Type declaration

getItemData

getItemData: () => T

Type declaration

    • (): T
    • Returns T

getItemMeta

getItemMeta: () => ItemMeta

Type declaration

getItemName

getItemName: () => string

Type declaration

    • (): string
    • Returns string

getParent

getParent: () => undefined | ItemInstance<T>

Type declaration

getProps

getProps: () => Record<string, any>

Type declaration

    • (): Record<string, any>
    • Returns Record<string, any>

getRenameInputProps

getRenameInputProps: () => any

Type declaration

    • (): any
    • Returns any

getTree

getTree: () => TreeInstance<T>

Type declaration

invalidateChildrenIds

invalidateChildrenIds: (optimistic?: boolean) => Promise<void>

Invalidate fetched children ids for item, and triggers a refetch and subsequent rerender if the item is visible


Type declaration

    • (optimistic?: boolean): Promise<void>
    • 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

invalidateItemData: (optimistic?: boolean) => Promise<void>

Invalidate fetched data for item, and triggers a refetch and subsequent rerender if the item is visible


Type declaration

    • (optimistic?: boolean): Promise<void>
    • 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

isDescendentOf: (parentId: string) => boolean

Type declaration

    • (parentId: string): boolean
    • Parameters

      • parentId: string

      Returns boolean

isDragTarget

isDragTarget: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

isDragTargetAbove

isDragTargetAbove: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

isDragTargetBelow

isDragTargetBelow: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

isDraggingOver

isDraggingOver: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

isExpanded

isExpanded: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

isFocused

isFocused: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

isFolder

isFolder: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

isLoading

isLoading: () => boolean & () => boolean

isMatchingSearch

isMatchingSearch: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

isRenaming

isRenaming: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

isSelected

isSelected: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

primaryAction

primaryAction: () => void

Type declaration

    • (): void
    • Returns void

registerElement

registerElement: (element: null | HTMLElement) => void

Type declaration

    • (element: null | HTMLElement): void
    • Parameters

      • element: null | HTMLElement

      Returns void

scrollTo

scrollTo: (scrollIntoViewArg?: boolean | ScrollIntoViewOptions) => Promise<void>

Type declaration

    • (scrollIntoViewArg?: boolean | ScrollIntoViewOptions): Promise<void>
    • Parameters

      • optionalscrollIntoViewArg: boolean | ScrollIntoViewOptions

      Returns Promise<void>

select

select: () => void

Type declaration

    • (): void
    • Returns void

selectUpTo

selectUpTo: (ctrl: boolean) => void

Type declaration

    • (ctrl: boolean): void
    • Parameters

      • ctrl: boolean

      Returns void

setFocused

setFocused: () => void

Type declaration

    • (): void
    • Returns void

startRenaming

startRenaming: () => void

Type declaration

    • (): void
    • Returns void

toggleSelect

toggleSelect: () => void

Type declaration

    • (): void
    • Returns void

updateCachedChildrenIds

updateCachedChildrenIds: (childrenIds: string[]) => void

Type declaration

    • (childrenIds: string[]): void
    • Parameters

      • childrenIds: string[]

      Returns void