MandarinConLaBarba / react-tree-menu

A stateless tree menu component for React.
http://mandarinconlabarba.github.io/react-tree-menu/example/index.html
MIT License
170 stars 51 forks source link

Refactor TreeNode render method #9

Closed cwadding closed 9 years ago

cwadding commented 9 years ago

Not a major change but I just wanted to clean up the render method because I am overriding it in my application because I want to have more than just text for my label (an icon next to the label). I was going to allow input of not just a string to the label but a component which I might do some other time but for now this is a good workaround and cleans up the code a bit too.

MandarinConLaBarba commented 9 years ago

Thanks for the PR @cwadding - give me a day or so to pull this down and see how it works w/ the examples.

MandarinConLaBarba commented 9 years ago

Thanks! I may open an issue later to make the label rendering method flexible.

markerikson commented 9 years ago

Yeah, would it be possible to do that? Being able to specify an arbitrary component as the label contents would be really helpful.