Webix.editors.$popup.text

Hello webix friends.

the following problem.

Datatable with a columns of cells with editor: ‘popup’

And I have this:

webix.editors.$popup .text = {
id:‘contacts’,
view:‘popup’,
body:{
view:“textarea”,
readonly: true,
width:400,
height:120,
},
on:{
onBeforeShow: function(item,a,b){
$(document).ready(() => {
if (!$(item) || $(item).html().length === 0) {
return false;
}
});
},
onBlur: function(){
$$(‘contacts’).hide();
},
onHide: function(){
//$$(‘contacts’).destructor();
}
}
};

The datatable load dynamically! When I filter my datatable it may happen that there is no popup response while I click on the cell but also the popup position is somehow on another position.

sometime it comes and sometimes not… Do I have to refresh the datatable content after filtering? And how can I do this?

Thanks a lot…

Michael

Hello again.

I have a solution. The problem is that this datatable has a leftSplit. That means all columns on the right side must be handled separately. When ‘comcon’ is the column with a editor: popup:
on the onItemClick event:

if (id.column === “comcon”) {
const record = this.getItem(id.row);
const popup = $$(“contacts”);

                    if (popup) {
                        popup.getBody().setValue(record.comcon || "");

                        const cellNode = e.target.closest(".webix_cell");

                        if (cellNode && cellNode.offsetParent !== null) {
                            popup.show(cellNode);
                        }
                    }

                    return false;
                } <

This is a work around. Possible you have a better solution?

Michael