Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TreeController<T>

Type parameters

Hierarchy

  • TreeController

Index

Constructors

constructor

Properties

Private allowOrdering

allowOrdering: boolean

Private callbacks

callbacks: Required<Pick<IOptions<T>, Callbacks>>

Private model

model: TreeModel<T>

Methods

acceptsChildren

  • acceptsChildren(node: T): boolean

canBeginAction

  • canBeginAction(node: T): Promise<any>

canPerformAction

  • canPerformAction(node: T, reference: T, action: ActionType): Promise<any>

executeAction

  • executeAction(node: T, reference: T, action: ActionType, args?: undefined | object): Promise<void>
  • Execute an action on the tree model, emitting events as appropriate.

    final

    Subclasses should not override this method. Use [performAction] instead.

    Parameters

    • node: T

      The node to move

    • reference: T

      The reference node for the move

    • action: ActionType

      The type of action being executed

    • Optional args: undefined | object

    Returns Promise<void>

Private executeCallback

  • executeCallback<K>(name: K, args: ArgsType<IOptions<T>[K]>): Promise<any>

Private executeCallbackSync

  • executeCallbackSync<K>(name: K, args: ArgsType<IOptions<T>[K]>): any

Private getReferenceIndex

  • getReferenceIndex(node: T, reference: T): number

Private handleCallbackError

  • handleCallbackError(name: string, err: Error): boolean

Protected performAction

  • performAction(node: T, reference: T, action: ActionType, args?: undefined | object): void

Object literals

Static Private DefaultOptions

DefaultOptions: object

allowOrdering

allowOrdering: false = false

canAcceptChildren

  • canAcceptChildren(): true

canInsertInto

  • canInsertInto(): true

canMove

  • canMove(): true

onAfterMove

  • onAfterMove(): undefined

Generated using TypeDoc