The MouseTargetData class is used to process and provide information about user interaction, especially mouse events, with specific areas and elements of a table built using HTML Div elements, Span elements, and Input elements.

The class encapsulates different types of data related to the element on which an event was targeted. Data such as the targeted row and column indices, the area on the table identified (header, body, or footer), the model of the table area the user interacted with, attributes of the HTML Input Element (value and type), associated action, content row, and CSS class applied to the element.

The constructor expects an EventTarget and TableScope objects as parameters - data encapsulated in the EventTarget object will be used to populate the properties of the MouseTargetData object.

Example

const mouseTarget = new MouseTargetData(eventTarget, tableScope);

Hierarchy

  • MouseTargetData

Constructors

Properties

action: null | string = null

The associated action with the HTML Element (retrieved through "data-ge-action" data attribute). Default is null.

areaIdent?: AreaIdent

The identification of the targeted area on an interaction event. Possible value can be 'header', 'body', 'footer'.

areaModel?: AreaModelIf

The model of the table area the user interacted with.

className: string = ""

The CSS class name applied to the target element. Default is an empty string.

colIdx: number = -1

The index of the targeted column on an interaction event. Default value is -1.

inputType: null | string = null

The type of the HTML Input Element (retrieved through "data-input-type" data attribute). Default is null.

row?: any

The specific row the user interacted with.

rowIdx: number = -1

The index of the targeted row on an interaction event. Default value is -1.

value?: any

The value(s) associated with the HTML Input Element the user interacted with.