I have a code like this.
$$('TLVab').attachEvent("onAfterEditStop", function(state, editor, ignoreUpdate) {
$$('deleteLTMPopup').show();//TODO parse state into the pop up
});
UI.deleteLTMPopup= {id:'deleteLTMPopup',view:'window',head:'D',modal:true,position:'center',resize:true,move:true,autowidth:true,body:
{rows:[
{id:'delLifeTimeMCN',template:'W'},
{cols:[
{},
{view:'button',value:'Cancel',width:60,click:function(){ this.getTopParentView().hide()}},
{id:'deleteLTMBtnOK',view:'button',value:'Delete',width:60,click:function(id){
var that = this;
myFunction(state);//TODO have to parse state
that.getTopParentView().hide();
}},
]},
]}
};
How do I pass state variable into the popup? I mean is there a .show(state) something like that. I have added //TODO inline comments in my code.
For the onAfterEditStop event, the state argument is a simple object with new and old value.
{ value: any, old: any }
You cannot extend the .show() method of the window view, but you can add to the .config object before calling .show()
see https://snippet.webix.com/o21oe6fq
The onAfterEditStop handler
and the delete button inside the dialog can grab the data