TreeTable issue

Hello Team,

I encountered the same problem like TreeTable not showing data properly - CUBA.Platform
Over hundreds of records the tree table doesn’t work properly (only if the filter is removed).
Cuba: 7.2.6 platform

Please help.
-n

Hi,

In general, to build a tree from a set of rows, all rows must be loaded, otherwise some children won’t find their parents and the tree will be incorrect. So any filter that can filter out parents will break the tree - children with no parents will become root nodes.

The generic filter component may affect the maximum number of loaded rows even if you don’t set any filtering conditions, it does this for paging. To avoid this, try to set the useMaxResults filter attribute to false, then the row set will be limited only by the maximum number of records that can be loaded to UI (10000 by default, see Entity Statistics). However, it will still break the tree as soon as you filter out some parent nodes - their children will go to the upper level.

I’ve created an issue to reconsider the logic of building trees - maybe we should just discard orphan records instead of showing them on the upper level.

Yes, you are right.
I don’t know, maybe I use useMaxResult or I switch to table component. However please keep me posted with this issue.

Best Regards,
-n