Is it possible to bind data of the context menu?

I’m wanted to have a dynamic context menu, with on a custom made template. lets call it attachContextMenuTo. Since it is a template view, there is no onBeforeContextMenu event being called. So I thought to bind data of the context menu, but I just cannot seem to get it to work. I wanted the list of options to change depending on what the user did as an interaction. I had constructed a webix data collection, lets call that webixCol. And then I have a method that creates the conext menu. I made the data property of that to be a blank, [].

so simple version would be:

{
    view: 'contextmenu',
    id: 'contextMenuId',
    data: [],
}

after that I attach that with:
contextMenuInstance.attachTo(attachContextMenuTo).

after that is created I do a simple bind:

$$('contextMenuId').data.sync(webixCol). and also the bind:
$$('contextMenuId').bind(webixCol) ← that one I dont think it should work I just tried it as a hope attempt.

The close thing I got to it working was the array was populated, with the right amount but all options were: undefined.

why not to set all menu items and hide/show required items in onBeforeShow event?
https://snippet.webix.com/z7n9frbq

Ya I think that can work as well! Thanks