mendixlabs / mendix-tree-table

Mendix Tree Table (Mendix 8, React based, Webmodeler compatible)
https://appstore.home.mendix.com/link/app/111095/
Other
3 stars 6 forks source link

Expand/collapse node(s) based on attribute on object in domain model #26

Open mjonsson opened 3 years ago

mjonsson commented 3 years ago

Hi JelteMX,

I'm working on a project where I would need to expand level-by-level or conditionally, based on attributes on node object in the domain model. Optimal solution for gaining full control would be to have a boolean attribute on the node, for example "Expanded" that can be used to expand/collapse nodes individually. Is this possible today? If not, is this something that could be added without too much effort?

JelteMX commented 3 years ago

Probably not on the node itself. Currently it is not possible.

The reason for this is simple: You don't want to set these values on persistent node objects. A node only holds values that are used for displaying in the table.

That being said, we might be able to build something around a non-persistent view that holds are reference set to selected/expanded nodes. I might have to rethink some of the logic pertaining selections/expansions.

mjonsson commented 3 years ago

Thanks for the response.

I'm currently loading all information from an external system (Teamcenter). This means all objects in the domain model for the tree table are non-persistent. It would be really nice to have more control on nodes with state attributes like "Expanded" and "Visible". I think it would be beneficial for many applications.

Hare are the functional requirements from customer I do not know how to implement with tree table:

Managed to solve hide/show with CSS. Searching solved with recursive microflow and CSS. However, still not able to resolve expanding/collapsing from microflow