beagle-web-react
beagle-web-react copied to clipboard
Children with fixed ids can break the listview
Beagle React version: 1.7.0
Steps To Reproduce
- Create a listview
- Inside the listview's template, use a component that names its children something other than
children. The componenttouchableis a good example (it useschild). - 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.