RevGrid - v0.9.3
    Preparing search index...

    Interface RevCellEditor<BCS, SF>

    interface RevCellEditor<
        BCS extends RevBehavioredColumnSettings,
        SF extends RevSchemaField,
    > {
        cellClosedEventer?: CellClosedEventer;
        keyDownEventer?: KeyDownEventer;
        pullCellValueEventer?: PullCellValueEventer;
        pushCellValueEventer?: PushCellValueEventer;
        readonly: boolean;
        closeCell(field: SF, subgridRowIndex: number, cancel: boolean): void;
        focus(): void;
        invalidateValue(): void;
        paint(
            cell: RevViewCell<BCS, SF>,
            prefillColor: undefined | string,
        ): undefined | number;
        processGridClickEvent(
            event: MouseEvent,
            viewCell: RevViewCell<BCS, SF>,
        ): boolean;
        processGridKeyDownEvent(
            event: KeyboardEvent,
            fromEditor: boolean,
            field: SF,
            subgridRowIndex: number,
        ): boolean;
        processGridPointerMoveEvent(
            event: PointerEvent,
            viewCell: RevViewCell<BCS, SF>,
        ): undefined | PointerLocationInfo;
        setBounds(bounds: undefined | RevRectangle): void;
        tryOpenCell(
            viewCell: RevViewCell<BCS, SF>,
            openingKeyDownEvent: undefined | KeyboardEvent,
            openingClickEvent: undefined | MouseEvent,
        ): boolean;
    }

    Type Parameters

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    cellClosedEventer?: CellClosedEventer

    Editor can optionally use this eventer to notify Grid that it has completed

    keyDownEventer?: KeyDownEventer

    Emits key down events generated by editor

    pullCellValueEventer?: PullCellValueEventer

    Get latest data from data server

    pushCellValueEventer?: PushCellValueEventer

    Save data to data server. Optional. If not supplied then editor is read only

    readonly: boolean

    Indicates if editor can only display data

    Methods

    • Close the editor - returns data that was in editor or undefined if cancel specified

      Parameters

      • field: SF
      • subgridRowIndex: number
      • cancel: boolean

      Returns void

    • Implement if editor can be focused.

      Returns void

    • Server data value has changed since being provided to editor or pulled by editor

      Returns void

    • See if the editor wants the mouse down event. If fromEditor is true, then this editor generated the event in the first place

      Parameters

      Returns boolean

    • See if the editor wants the key down event. If fromEditor is true, then this editor generated the event in the first place

      Parameters

      • event: KeyboardEvent
      • fromEditor: boolean
      • field: SF
      • subgridRowIndex: number

      Returns boolean

    • See if the editor wants the mouse move event. If fromEditor is true, then this editor generated the event in the first place

      Parameters

      Returns undefined | PointerLocationInfo

    • Implement if editor paints itself (eg a HTML Input element). If bounds is undefined, then editor is hidden

      Parameters

      Returns void

    • Provide the initial data to the editor. This is done after all events have been subscribed to - so editor can start running

      Parameters

      • viewCell: RevViewCell<BCS, SF>
      • openingKeyDownEvent: undefined | KeyboardEvent
      • openingClickEvent: undefined | MouseEvent

      Returns boolean