Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CellEditorController

An object which manages cell editing. It stores editor overrides, decides which editor to use for a cell, makes sure there is only one editor active.

Hierarchy

  • CellEditorController

Implements

Index

Properties

Private _cell

_cell: CellConfig | null = null

Private _editor

_editor: ICellEditor | null = null

Private _metadataBasedOverrides

_metadataBasedOverrides: Map<string, [Metadata, ICellEditor | Resolver]> = new Map()

Private _typeBasedOverrides

_typeBasedOverrides: Map<string, ICellEditor | Resolver> = new Map()

Methods

Private _getDataTypeKey

Private _getEditor

  • Choose the most appropriate cell editor to use based on overrides / cell data type.

    If no match is found in overrides or based on cell data type, and if cell has a primitive data type then TextCellEditor is used as default cell editor. If 'default' cell editor is overridden, then it is used instead of TextCellEditor for default.

    Parameters

    Returns ICellEditor | undefined

Private _getMetadataBasedEditor

Private _metadataIdentifierToKey

  • _metadataIdentifierToKey(metadata: Metadata): string

Private _metadataMatchesIdentifier

Private _objectToKey

  • _objectToKey(object: any): string

Private _onCancel

  • _onCancel(): void

Private _onCommit

cancel

  • cancel(): void

edit

setEditor

  • Override cell editor for the cells matching the identifier.

    Parameters

    • identifier: EditorOverrideIdentifier

      Cell identifier to use when matching cells. if identifier is a CellDataType, then cell matching is done using data type of the cell, if identifier is a Metadata, then partial match of the cell metadata with identifier is used for match, if identifier is 'default' then override is used as default editor when no other editor is found suitable

    • editor: ICellEditor | Resolver

      The cell editor to use or resolver to use to get an editor for matching cells.

    Returns void

Generated using TypeDoc