Skip to content

Identify leaf nodes #27

Closed
Closed
@esalter

Description

@esalter

Adding a class or other identifier on a leaf node would help, preferably on the "li" element. The use case I have is I'd like to style the labels of the leaves differently but without resorting to complicated css rules. (technically it would be possible but the rule is longer than I'd like).

I had a quick peek at the code and it looks like it's pretty much as easy as checking for if rawChildren is null when rendering the "li" node. Would you accept a pull request?

Nice library! Thanks!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions