Closed RemiCELLARD closed 1 year ago
You can already place any custom content for the context menu including RadzenMenuItem and a plain hr
HTML element:
https://blazor.radzen.com/contextmenu
Trying to understand why this was closed/not considered ?
Like the OP, I am also looking for an "easy" programatic way to add a separator to the context menu.
Having to use the RenderFragment way just isn't convenient enough, is prone to error and inefficient especially if you have a large number of items in the menu or the items that appear in the menu are dynamic based on various factors.
Having the "IsSeparator" flag or even support for Class property (applied to the li element) just seems logical ?
Is your feature request related to a problem? Please describe. I'm always frustrated when you have to use RenderFragment instead of
ContextMenuItem
class to create a separator in ContextMenu (example : for DataGrid Cell)Describe the solution you'd like
ContextMenuItem
a new getter/setter (boolean)IsSeparator
<hr/>
in your ContextMenu.Describe alternatives you've considered You can use RenderFragment (see https://blazor.radzen.com/docs/api/Radzen.ContextMenuOptions.html#Radzen_ContextMenuOptions_ChildContent ) but for my case, it's better to use object.
Additional context No more element