docs icon indicating copy to clipboard operation
docs copied to clipboard

Add a code example for TreeGrid where the items are not of same type

Open mstahv opened this issue 2 years ago • 1 comments

The current code example expects all items in the grid are of the same time (and contains a self reference). While this is good example to have, it is also common that in Tree the items are of different types (and hierarchy might be expressed in different ways).

There could be for example something similar to this (except adapted to TreeGrid instead of org.vaadin.tatu.Tree): https://gist.github.com/mstahv/bba0a863069df5368282949593981c69 (Cities/Streets/Houses). It is bit nasty to implement with the current API, but possible (and propably rather common) so I think we should add it now and enhance later, in case the API becomes more flexible.

If you think this issue is important, add a 👍 reaction to help the community and maintainers prioritize this issue.

mstahv avatar Nov 07 '23 10:11 mstahv

Here is a gist that contains code with TreeGrid instead of org.vaadin.tatu.Tree:

https://gist.github.com/mstahv/835c997fa1d5d9755ed740281c4cd55d

mstahv avatar Nov 07 '23 11:11 mstahv