Editor: elements disappear after binding collection

Hi there,

I am trying to create a custom (data)table or grid layout with:

  • Header row with one static column followed by dynamic columns (for dynamic column names)
  • Dynamic rows (per parent item)
  • In each row one static colomn followed by dynamic colums (to match the structure of the header column)
  • in each dynamic column i want to render child items for that column

For testing I use a manually created json variable

The header row works

I also have a collection list that repeats over the parent items.
Then I have two columns, one for the static column (name of parent item) and the second to act as an container for the the dynamic columns. Rendering of the dynamic columns works.

I am also able to render child items and show the description of that item.

Next step is that when there are no child items, I want to show a button to add a child item (later use case)

But the problems I have are:

  • I can’t add child elements (the button) in parent element that has a data collection bound to it. So I add the elements prior to data binding.
  • When I bind the data, the second/last element (in my case the button) disappears in the element tree. When I unbind data it reappears.

Questions:

  • What is happening with the disappearing elements?
  • how can use multiple sibling vs child/parent elements in container elements that have data bindings?

Thanks for sharing insights

I think your data is undefined, so it ends up being hidden, it can still be found and the binding can be changed after selecting the elements from the left layer menu.

2 Likes

Wow, that was quick. I will check it out

1 Like

I think you will find it here, but with the data changed, the value/path might be null, so just select it from the sidemenu and change the bind in the settings on the right.

1 Like

The problem is that the element also disappears from the side panel (element tree)

Well, I tried some approaches and it works now. I revisited the structure in the element tree. In each collection I placed a container for a record, and in that record container I placed the content items. That worked like a charm:

Structure

Result: