React Data Grid EventManager
Description
Event DOM manager for internal use in Handsontable.
Members
context Source code (opens new window)
eventManager.context : object
Methods
addEventListener Source code (opens new window)
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 (opens new window)
eventManager.clear()
Clear all previously registered events.
destroy Source code (opens new window)
eventManager.destroy()
Destroy instance of EventManager, clearing all events of the context.
destroyWithOwnEventsOnly Source code (opens new window)
eventManager.destroyWithOwnEventsOnly()
Destroy instance of EventManager, clearing only the own events.
fireEvent Source code (opens new window)
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 (opens new window)
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. |