Closed Andries-Smit closed 5 years ago
Hi Fabian,
Nice widget, Though one issue. It is required to unsubscribe when context changes, else events will be triggered double.
Just add this.unsubscribeAll(); before subscribing https://apidocs.mendix.com/7/client/mxui_widget__WidgetBase.html#unsubscribeAll
this.unsubscribeAll();
Also (for performance) it is recommended to remove al unused imports like: "dojo/dom-style", "dojo/dom-construct", "dojo/_base/array", etc
"dojo/dom-style", "dojo/dom-construct", "dojo/_base/array",
Note that the dead code, _handles, _contextObj, constructor, postCreate can be removed too
_handles, _contextObj, constructor, postCreate
Cheers, Andries
Hi Andries, thanks for the feedback. I've updated the widget and released a new version.
Hi Fabian,
Nice widget, Though one issue. It is required to unsubscribe when context changes, else events will be triggered double.
Just add
this.unsubscribeAll();
before subscribing https://apidocs.mendix.com/7/client/mxui_widget__WidgetBase.html#unsubscribeAllAlso (for performance) it is recommended to remove al unused imports like:
"dojo/dom-style", "dojo/dom-construct", "dojo/_base/array",
etcNote that the dead code,
_handles, _contextObj, constructor, postCreate
can be removed tooCheers, Andries