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

Enhancement Request - Tree Table #245

Closed
sanfordandrew opened this issue Sep 22, 2024 · 3 comments
Closed

Enhancement Request - Tree Table #245

sanfordandrew opened this issue Sep 22, 2024 · 3 comments

Comments

@sanfordandrew
Copy link

I'm hoping you might consider adding tree-table like functionality to infinite table, or have a way of replicating such with the existing grouping features.

If you have a datasource like this:

[{building:'building 1', floor:'one', office:'A', numOccupants:'5'},
{building:'building 1', floor:'one', office:'B', numOccupants:'1}, {building:'building 1', floor:'two', office:'F', numOccupants:'2'}, {building:'building 1', floor:'two', office:'G', numOccupants:'1},
{building:'building 2', floor:'one', office:'A', numOccupants:'5'},
{building:'building 2', floor:'one', office:'B', numOccupants:'1}, {building:'building 2', floor:'two', office:'X', numOccupants:'1},
{building:'building 2', floor:'two', office:'Y', numOccupants:'3}, {building:'building 3', floor:null, office:'M', numOccupants:'2},
{building:'building 3', floor:null, office: 'N', numOccupants:'1`}]

I have a single grouping column, and am grouping by building and floor.

Note that building 3 is a single floor building, so the floor attribute is null.

Is there a way to not render a row for the floor attribute for building 3? In other words, to make infinite-table behave more like a tree-table; if one of the grouping attributes is null, skip it?

@radubrehar
Copy link
Contributor

Hi Andrew and thanks for your request and question.
You might be able to use filterFunction to filter out some rows without using column filters - but probably not ideal.
I'll have a think and come back with more solutions soon. The tree-table is definitely an area to explore for Infinite.

@radubrehar
Copy link
Contributor

hi @sanfordandrew
we had a look at your request and put your code in a codesandox - can have a look at it here
Basically it's what other grids call "unbalanced grouping" - a functionality which is nice to have. It's not a full tree grid - a tree grid should offer more functionality besides just unbalanced groups.

While our community feature requests are lower priority than our commercial requests, we do plan to add support for unbalanced groups in the next 1-2 months. Hope this works well with your timing.

Thanks for using Infinite Table!

@radubrehar
Copy link
Contributor

hi @sanfordandrew

we just shipped the tree functionality - see https://infinite-table.com/docs/learn/tree-grid/overview for details

Hope it fits your use-case well.

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

2 participants