Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Information request: Is variable row height a possibility? #276

Open
janvandenberg opened this issue Oct 6, 2024 · 3 comments
Open

Information request: Is variable row height a possibility? #276

janvandenberg opened this issue Oct 6, 2024 · 3 comments

Comments

@janvandenberg
Copy link

First of all, I want to express my sincere gratitude to all the contributors of react-arborist. This library is truly awesome and it looks like it can be incredibly helpful in my project.

I'm wondering if there's a way to create variable row heights in react-arborist. My node leaves are sometimes bigger than the allotted height. Right now I can only cut off my text, but I was wondering if there is another way? I've attempted to implement this using a row renderer, but I haven't been successful so far. Since the absolute positioning of the siblings don't take my custom height into consideration.

@CHE1RON
Copy link

CHE1RON commented Oct 8, 2024

That would be a great thing to have! 👍

@gpalomar
Copy link

Is there a planned date for this functionality? I really need it in my project 😃

@jameskerr
Copy link
Member

If you are asking for a dynamic height that adjusts based on the contents of the node, that is not a goal for this project. But if you want to provide the height of each node statically, we could do that. The goal with this project was to virtualize the rows so that you can have many items in the tree. Virtualization is fast because we can do math to calculate where a row should be positioned.

I use react-window for the virtualization and they do have an option for mixed-height rows. You can see what I mean over at their docs

https://react-window.vercel.app/#/examples/list/variable-size

One day, we could use that instead of FixedSizeList. Not high on the priority list though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants