I’d like to control the accessibility and the behavior of a custom context menu item, ideally as follows:
if the current selection spreads over more than a single row, disable that menu item
else enable or disable it depending on the row concerned with the selection
when enabled, adjust its behavior also depending on the row concerned.
The menu item’s purpose would for example be to insert a row with some predefined cell contents above the selection.
I tried to play a bit with the “beforeContextMenuSetItems”… to no avail, so far.
Thanks in advance for any hint!
I think that you’ll be able to add every one of this options via custom context menu item. Here’s an example when I block the option visibility to certain rows (if you add an IF you can block it depending on a row index) http://jsfiddle.net/handsoncode/59ybb588/
Thank you! Context menus don’t show up when running the fiddle on my desktop, I don’t know why, but in any case your example is very helpful, I didn’t know about the “hidden” property in this context (no pun intended).
I’m trying to build up simple “use-cases” in order to get familiar with your nice product (wrapped over Vue) and I’m still at the bottom of the learning curve, so please forgive that stupid question of mine: how do you get access to the hot instance in a vue environment?