POD container bug

The new POD container feature for blocks and containers allows us to place individualized content/components inside of reusable component instances.

We have placed such a POD container inside of a reusable component with “Data Container” checked (so it has a data model), lets call it “Child” component.This reusable component itself is placed inside another reusable component (also with it’s own data model), lets call it “Parent” component.

So far so good! When creating logic for an element inside of the POD container, we see options for accessing the various data models (POD, Child, Parent). But when assigning a property/value to the Parent data model on a button click (a button inside the POD), it does not actually affect the parent data model at all.

When printing the contents of the Parent data model (again via button click on a button inside the POD) to console, it actually prints the contents of the Child data model.

Here’s an illustration:

The output of the print statement is:

1. dialogModal: Array(1)
  1. 0: "modal"
  2. length: 1
2. is_cancelled: true

So what is supposed to be the Parent data model is in fact the child data model. But I need to access the Parent…

Hello @Alex_Klein

Thank you for describing the issue, but looks like I’m a little confused with the chaining of these components.
Could you create a minimal reproducible example on the external page?

Regards, Dima.

I prepared a simple page with simple example… and am unable to reproduce the bug :roll_eyes:

So I’ll spend a bit of time debugging our more complicated case…

Hello @Dima ok I was able to reproduce. Here is a page:

https://worthypickle.backendless.app/api/files/ui-builder/containers/AlexK_prod/index.html?page=ExampleTestPage

It has a POD container inside of a child reusable component. The child instance is inside of a parent reusable component. The input field in the POD was added while editing the parent component, and is wired up to set a property in the parent component. In the parent component, there is another input field which is supposed to have the value of the aforementioned property… but it isn’t working. Hope this helps?

Hello @Alex_Klein

I’ve created an internal ticket BKNDLSS-32254 to investigate the issue.
Maybe this approach will work for you.

Regards

Hi @viktor.liablin,

Wow interesting — I never noticed the “data block” option for a component on Before Mount. Nice way to get a “quasi” data model without having to explicitly set the component to be a data model :grinning:

We have built a workaround solution for our particular problem already, but this will be good to know for the future :clap: