how can I get config.$masterId when clicking common.editButton, if I have templateStart and templateEnd options in type section?
here is the code:
type : {
templateStart: <div class="some_class"><div></div>,
templateEnd:"</div>"
},
template: function(obj, common){
return "<div>" + obj.name + "</div>" + "<div style='float:right;'>"+ common.editButton(obj, common) +"</div>"
},
activeContent:{
editButton:{
id : "editButtonId",
view : "button",
type : "iconButton",
icon : "pencil",
width : 30,
click: function (id, e){
console.log(this.config.$masterId);
}
},
}
So, in console.log I get ‘null’, but when I comment the type section it works correctly.