Input or select field
Hello. How can I make an option or an input field in this menu? I need to insert these options into the context menu sections. It is also not clear how to bind a menu to a table row by id
Hello. How can I make an option or an input field in this menu?
You can't at the moment. I will consider this and maybe it will be possible to choose a type of menu item to render (text, inputbox etc...)
"It is also not clear how to bind a menu to a table row by id"
Do you want each table row to have different context menu?

const dataTable = document.getElementById('data-table');
let contextMenu = null;
dataTable.addEventListener('contextmenu', e => {
e.preventDefault();
if (contextMenu != null) {
contextMenu.hide();
contextMenu.uninstall();
}
contextMenu = new ContextMenu(document.body, [{
text: 'Remove row',
onclick: ee => {
if (e.target.parentElement.tagName == 'TR') {
e.target.parentElement.parentElement.removeChild(e.target.parentElement);
}
}
}, ]);
contextMenu.install();
});
or maybe just passing html for a menu entry?
Thanks. Need to pass html to menu cell
or maybe just passing html for a menu entry?
Not sufficient if you want the data to persist but it's great to have suggestions so they can be tried. ContextMenu is rebuilt every time it is requested.