Access component within a tabbed container

Hi,

I'm stuck after a UI change ...

I have a ListView (say 'persons_list') on my MAIN canvas.
This repeatable is of course populated by a query.

I had uses for this component in many places, like {{persons_list.data[index].name}}

I just moved this persons_list within a tabbed container, and suddenly the {{persons_list}} becomes unknown :
Error: persons_list is not defined

I cannot understand why, and how do I do now ?

Thanks for your help.

1 Like

hi @MFP

the ListView should still have a data attribute, but then if you want to access one of the listed components within the ListView, you'll find the name of the component in the first instance and then it will be an array:

In this case above, I have a listView2 with container3 as the first instance, and then looking at the state view for container3 shows an array of all the other instances of a container based off this one.

does that help at all?

@MFP here is the list view:

and then container as each instance of the listView:

1 Like

Hi @MFP,

Sometimes when making UI changes with ListViews a good refresh of the browser helps, I've noticed the same behavior in the past, i.e. that I couldn't refer to the listview and later on the day or the day after it was all good.

In any case, persons_list should be defined regardless of being on main canvas or within a container (unless missing some other info, like container being also a repeatable).

If the problem persists, would you be able to share some more info on which components (and in which part of their settings) are referring the listView?

1 Like

Well, Miguel ...
That was it :roll_eyes:

Thanks.

2 Likes