You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble with propagating a "change" event on a custom widget. This is my widget:
define(["dojo/_base/declare","dijit/_Widget","dijit/_TemplatedMixin","dojo/on","dojo/text!./TopEditor.html",],function(declare,_Widget,_TemplateMixin,on,domClass,template){returndeclare("myEditor",[_Widget,_TemplateMixin],{templateString: template,value: false,_onClick: function(event){this.set("value",!this.get('value'));this.emit("change");},_setValueAttr: function(value){this.value=value;// ... do some dom stuff ...}});});
Problem is, that in Line 477 of Editor.js (https://github.com/SitePen/dgrid/blob/master/Editor.js#L477) "this" is given to the _updatePropertyFromEditor method, while "this" in my context is the domNode of the widget and not the widget itself and then propagating of "dgrid-datachange" does not work . Changing "this" to "cmp" fixes the Problem. Am I doing something wrong? Is this a bug?
Hello,
I'm having trouble with propagating a "change" event on a custom widget. This is my widget:
Problem is, that in Line 477 of Editor.js (https://github.com/SitePen/dgrid/blob/master/Editor.js#L477) "this" is given to the _updatePropertyFromEditor method, while "this" in my context is the domNode of the widget and not the widget itself and then propagating of "dgrid-datachange" does not work . Changing "this" to "cmp" fixes the Problem. Am I doing something wrong? Is this a bug?
See here for the "fix": https://github.com/scyv/dgrid/commit/3536a966bf45fc9178718e8fef882014dd50a782
The text was updated successfully, but these errors were encountered: