Hello Team,
it seems unable to add a specified class name to a submenu(but works fine in non-sub menu),
and also want to know how to use ContextMenuItem.isSelected?
function customContextMenu(items,data){
item.push({
label:'parent menu',
class:'class1',// works fine
submenu:[
{
label:'child menu',
class:'class1'//not work
}
]
});
}
how to make submenu's class valid?
we also want to know how to use the property "isSelected", since there is a requirement that when the menu isSelected,apply a specified css class to it.
Hi,
Thank you for posting your question.
There seems to be an issue with applying classes to submenu items with customizeContextMenu()
– we'll take a look at this and provide a fix with our upcoming release ETA Aug 23rd.
Speaking of the isSelected
property, it indicates whether the menu item is checked. Here's a sample showcasing how to apply different CSS classes depending on the isSelected
value: https://jsfiddle.net/flexmonster/p4mrhsxa/.
Please let us know if there is anything else we can help you with.
Best regards,
Mykhailo
Thanks!
Hi,
Hope you’re doing well!
We’ve released a fix addressing the issue with applying CSS classes to submenu items in customizeContextMenu()
.
This is available in the 2.9.6 version of Flexmonster: https://www.flexmonster.com/release-notes/.
You are welcome to update the component. Here is our updating to the latest version guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
Best regards,
Mykhailo
thanks