patorjk/d3-context-menu

Support headers and dividers

Closed this issue · 4 comments

One thing that would be nice is support for headers and dividers, similar to bootstrap: http://getbootstrap.com/components/#dropdowns-divider

I'm not sure how to approach this, or if it even makes sense passing decorative html elements via the json menu. Maybe something like support for multiple "types": action, header, and divider.

For now, I think my only solution is to programmatically inject a list-item and define a custom class for it.

Any thoughts? Thanks.

Oh, a "disabled" option for actions would be nice too.

Sorry for the very delayed reply, these are good ideas. I've been short on time recently, but would accept a pull request for these features.

Features added in.

Thanks!