Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OptionCellEditor

Cell editor for option cells.

It supports multiple option selection. If cell metadata contains type attribute 'array', then it behaves as a multi select. In that case cell data is expected to be list of string values.

Hierarchy

Implements

Index

Type aliases

Static CellConfig

CellConfig: object

An object which holds the configuration data for a cell.

Type declaration

Constructors

constructor

Properties

Private _isMultiSelect

_isMultiSelect: boolean = false

Private _select

_select: HTMLSelectElement

Protected cell

Cell configuration data for the cell being edited.

Protected editorContainer

editorContainer: HTMLDivElement

The div element used to contain and position editor widget.

Protected inputChanged

inputChanged: Signal<this, void> = new Signal<this, void>(this)

A signal emitted when input changes.

Protected Optional onCancel

onCancel: undefined | function

Callback method to call on cell edit cancel.

Protected Optional onCommit

onCommit: undefined | function

Callback method to call on cell edit commit.

Protected validator

validator: ICellInputValidator | undefined

Cell input validator to use for the cell being edited.

Protected validityNotification

validityNotification: Notification | null = null

Notification popup used to show validation error messages.

Protected viewportOccluder

viewportOccluder: HTMLDivElement

The div element used to prevent editor widget overflow beyond grid viewport.

Accessors

isDisposed

  • get isDisposed(): boolean

Protected validInput

  • get validInput(): boolean

Methods

Private _bindEvents

  • _bindEvents(): void

Private _createWidget

  • _createWidget(): void

Private _deserialize

  • _deserialize(value: any): string | string[]

Private _onBlur

  • _onBlur(event: FocusEvent): void

Private _onKeyDown

  • _onKeyDown(event: KeyboardEvent): void

cancel

  • cancel(): void

Protected commit

Protected createValidatorBasedOnType

dispose

  • dispose(): void

edit

Protected getCellInfo

  • getCellInfo(cell: CellConfig): Private.ICellInfo

Protected getInput

  • getInput(): string | string[] | null

Protected setValidity

  • setValidity(valid: boolean, message?: string): void
  • Set validity flag.

    Parameters

    • valid: boolean

      Whether the input is valid.

    • Default value message: string = ""

      Notification message to show.

      If message is set to empty string (which is the default) existing notification popup is removed if any.

    Returns void

Protected startEditing

  • startEditing(): void

Protected updatePosition

  • updatePosition(): void

Protected validate

  • validate(): void

Generated using TypeDoc