Define output DataTree for multiple called components


I wrote a component that has a tree as output. The input is one number item. But as I plugin a list of numbers the component is called multiple times and the output is complex tree. I would like to define the output by myself for that case. Is there any example code for that?


If you want to handle the behavior for lists yourself - constructing a tree the way you want it in the output - you’ll have to set the input param to have list access. At that point if you want to create a special case for single values, you can intake the list and check if it only contains one item.

1 Like