Add data dynamically to tree with contextmenu attached

Hello,

I have a tree view with data loaded from my server.

webix.ui({
	container:"...",
	id: "mytreemenu",
	view:"tree",
	scroll: "xy",
	url: "...",
	onContext:{}
});

I attached a contextmenu to this tree view :

webix.ui({
	view:"contextmenu",
	id:"mycontextmenu",
	on:{
	      "onBeforeShow": function(){ ... },
	       "onItemClick": function(id, e, node){ ... }
	}
});

$$("mycontextmenu").attachTo($$("mytreemenu"));

But now, i have a button for dynamically add item into my tree view (like this : )

$$("mytreemenu").add({id:520, value:"new item"});

My problem is that my new item doesn’t have the contextmenu.
I tried to do a .refresh() on both (mytreemenu & mycontextmenu), i tried too to attach again the contextmenu to my tree view with attachTo().

Maybe, someone has a solution for me ?

Thank you very much,

Chloé

please check all parts of your code, especially onBeforeShow of contextmenu.
in this snippet contextmenu works as expected.
https://snippet.webix.com/pjo77zof