Skip to content

Better control on nodes style #49

@Lothiraldan

Description

@Lothiraldan

Hello,

first of all thank you for react-virtualized-tree, it's working well so far and I hope will fix the performance issues I saw with other tree modules.

I wanted to use bulma levels https://bulma.io/documentation/layout/level/ in my nodes but the output were not as great as expected:

tree-bulma-margin

After digging a bit,and with some helps, I figured out that by using padding instead of margin, the output will be the one expected and the content will not be cropped:

tree-bulma-padding

I ended up doing the modification in my fork branch: master...Lothiraldan:Lothiraldan-patch-1

I don't think I should make a PR as simply changing margin into padding would be too specific, I'm pretty sure some people might need margin and not padding.

Do you have an idea which API could we have for supporting both? Maybe having a styleFunction argument that can return the style for each node, what do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions