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

Add support to render a footer beneath the tree #228

Open
TheElmo opened this issue Oct 17, 2024 · 1 comment
Open

Add support to render a footer beneath the tree #228

TheElmo opened this issue Oct 17, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@TheElmo
Copy link

TheElmo commented Oct 17, 2024

Is your feature request related to a problem? Please describe.
I'm currently using this library to implement a feature where to rootnodes in the tree are groups of entities and you can drag and drop each child node to those group. Thus being able to group the entities as desired. We ran into the problem of needing to render a footer for this component for totals of all the groups.

But because this library currently does not support the rendering of a footer element beneath al the rootnodes we implemented a workaround to use display flex on the tree and order on the footer element to put the footer element at the bottom.

Obviously this is a workaround since altering the order of elements on the screen without altering the order of those elements in the DOM is not accessibility friendly.

Describe the solution you'd like
Tree component could accept a renderFooter callback the is placed beneath the Container that is currently rendered in the Tree. As parameters it is given an array of the data contained in each Node in the Tree so the render function can use this as desired in the footer. (If this can result in performance issues due to the potential size of such an array maybe a more clever solution is needed)

Describe alternatives you've considered
As described above, currently we use css to put our footer element beneath al the nodes.

Additional context
Not feature request related but: English is not my native language (Dutch), please excuse any grammatical errors.

@TheElmo TheElmo added the enhancement New feature or request label Oct 17, 2024
@TheElmo
Copy link
Author

TheElmo commented Oct 17, 2024

I'd also be able to work on this feature myself BTW.

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

No branches or pull requests

2 participants