beagle-web-react icon indicating copy to clipboard operation
beagle-web-react copied to clipboard

Children with fixed ids can break the listview

Open Tiagoperes opened this issue 4 years ago • 0 comments

Beagle React version: 1.7.0

Steps To Reproduce

  1. Create a listview
  2. Inside the listview's template, use a component that names its children something other than children. The component touchable is a good example (it uses child).
  3. Create a component, give it a fixed id, and place it as a child of the component created in the previous step.

Link to code example:

This example uses an image inside a touchable in the template of a list view: https://playground.usebeagle.io/#/cloud/S3-b213d4c3-31b2-4f03-a4e0-e6cdbabb75c3?platform=react

The current behavior

Every element created in the step 3 will have the same Beagle ID, which is very wrong. The Beagle ID should be a unique identifier.

In the example I linked, another effect is that every image renders the same.

The expected behavior

I expected every component to have a unique Beagle ID, they should be prefixed by the fixed id, but have suffixes like ":0", ":1", etc.

Tiagoperes avatar May 04 '21 15:05 Tiagoperes