Support Topics Documentation Slack YouTube Blog

What is correct way to show list inside another list?

Hi, everyone!
I have a question about correct way to show list inside another list.

For example, I have a list of orders and I wanna show a list of items (goods) for each order.
What will be correct way to do this? Should I make a new container inside of a cell and load list of goods in it?
Maybe there is some article or tutorial for case like this?

And there are two cases (I assume the answer might be different for each of them):

  1. When I want to show just a title of each item in one cell, sepated by comma. Like this: https://monosnap.com/file/OmC5csMxDnDPy2k5CZq78rKvGVONCv
  2. When I want to show detailed information about each of item. So it more like table inside a table. Like this:
    https://monosnap.com/file/wB8IeCMUJexPO7TpAvDSbT78Tt3XHh

I haven’t tried any implementation yet. Just decieded to discuss first, maybe get some advice or direction.

Hello @Nikolay_Neustroev

It is definitely a possible case, using the UI-Builder you are almost not limited in UI and Logic development.
Take a look at this UI, there are mixed two components Container and Block and they are both “Dynamic List”

When you are working with Dynamic Lists you’ve got two approaches to assigning data items:

  1. use “Set Dynamic List Items” block, you can find it in the Codeless Toolbar, but make sure you have at least one Dynamic Container

  2. use “Data Binding”, it updates items automatically in the list, I prefer this one

As result, we’ve got a List of Lists:

I use a simple JSON but can get this data from the server:

[
  {
    "name"    : "Parent 1",
    "children": [
      { "name": "Child 1" },
      { "name": "Child 2" }
    ]
  },
  {
    "name"    : "Parent 2",
    "children": [
      { "name": "Child 3" },
      { "name": "Child 4" },
      { "name": "Child 5" }
    ]
  }
]

Regards, Vlad

Vlad, thank you! I will try it.