How to configure Tree Widget?

0
Hi everyone,I’m working with the Mendix Tree widget to display a hierarchical structure in my app. I want to load child nodes dynamically only when a parent node is expanded, rather than loading the entire tree upfront. Does anyone know how to configure the Tree widget or the underlying microflows to achieve this? Any best practices or example projects would be appreciated! Thanks in advance!
asked
1 answers
3

Hi Raja, to dynamically load and expand nodes in the Mendix Tree widget

  1. Set the Tree widget’s data source to “Microflow”.

  2. Create a microflow that takes the current parent node as input and returns a list of its child objects.

  3. The Tree widget will call this microflow whenever a node is expanded, loading only the children for that node.

  4. Ensure your domain model supports a parent-child relationship so the microflow can query child items based on the parent.

This approach improves performance by loading data on demand instead of loading the entire tree at once.

 

I hope this one helps you! :)

answered