This repository has been archived by the owner on Apr 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Input or select field #4
Comments
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...)
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 |
Not sufficient if you want the data to persist but it's great to have suggestions so they can be tried. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
The text was updated successfully, but these errors were encountered: