off(eventName:String, functionName:String)
Removes JavaScript event handlers that are attached to a pivot table component with the on() method. Follow the link to see a full list of events.
Name | Type | Description |
---|---|---|
eventName | String | Specifies a name of the component’s event. |
functionName | String | optional Specifies a name of the event handler to be removed. If it is not specified, all the event handlers are removed for this event. |
'reportchange'
event:
webdatarocks.off('reportchange');
'reportcomplete'
event:
webdatarocks.on('reportcomplete', 'onReportComplete'); function onReportComplete(result) { console.log('The report has been loaded successfully!'); }
'beforetoolbarcreated'
event:
webdatarocks.off('beforetoolbarcreated', 'onToolbarCreated');
Important note If you add the event listener the following way:
webdatarocks.on('reportchange', function () { alert('The report has been changed!'); });
Then it is not possible to remove such a handler by its name. All that is feasible is to remove all the handlers from an event:
webdatarocks.off('reportchange');
See the CodePen demo.