React Data GridEventManager

Description

Event DOM manager for internal use in Handsontable.

Members

context

Source code

eventManager.context : object

Methods

addEventListener

Source code

eventManager.addEventListener(element, eventName, callback, [options]) ⇒ function

Register specified listener (eventName) to the element.

Param Type Default Description
element Element Target element.
eventName string Event name.
callback function Function which will be called after event occur.
[options] AddEventListenerOptions
boolean
false optional Listener options if object or useCapture if boolean.

Returns: function - Returns function which you can easily call to remove that event.

clear

Source code

eventManager.clear()

Clear all previously registered events.

destroy

Source code

eventManager.destroy()

Destroy instance of EventManager, clearing all events of the context.

destroyWithOwnEventsOnly

Source code

eventManager.destroyWithOwnEventsOnly()

Destroy instance of EventManager, clearing only the own events.

fireEvent

Source code

eventManager.fireEvent(element, eventName)

Trigger event at the specified target element.

Param Type Description
element Element Target element.
eventName string Event name.

removeEventListener

Source code

eventManager.removeEventListener(element, eventName, callback, [onlyOwnEvents])

Remove the event listener previously registered.

Param Type Default Description
element Element Target element.
eventName string Event name.
callback function Function to remove from the event target. It must be the same as during registration listener.
[onlyOwnEvents] boolean false optional Whether whould remove only events registered using this instance of EventManager.