recktenwaldfabian / mendix_OnAnyChange

0 stars 1 forks source link

Unsubscirbe missing #1

Closed Andries-Smit closed 5 years ago

Andries-Smit commented 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

Also (for performance) it is recommended to remove al unused imports like: "dojo/dom-style", "dojo/dom-construct", "dojo/_base/array", etc

Note that the dead code, _handles, _contextObj, constructor, postCreate can be removed too

Cheers, Andries

recktenwaldfabian commented 5 years ago

Hi Andries, thanks for the feedback. I've updated the widget and released a new version.