Hello Community. I am fairly new to Retool and need some urgent help on this one. So, I have a listview component as you can see in the image. Now, whenever, I click on the competent or not competent button, it shows me the confirmation dialogue box. But the problem is, it shows the dialogue box for all the entries inside the list whereas I want it to be shown for the specific list item. Any help would be highly appreciated.
Hi @shubham1, for what I understood in the model you don't need a listView component. You just need to create a dynamic Modal, and get the selected row from the table to fill some dynamic fields and approve it or not. To reference the selected row you can use {{ tableName.selectedRow }}.
@Almopt hi! Thanks for responding! Actually I need listview, because I want to show multiple components. Attached image for your reference
Could you explain what's your use case? with some print screens?
Sure. So basically this is a student's list.
When I click on the Mark button, it opens up list of all the courses of that particular student.
So when I click on the competent or not competent button, it should open a confirmation box for that specific course but it opens for all the courses.
@shubham1 thanks for sharing your use case more in detail. So in the listView Component every component you add it will be replicated to the other childs in the listView. Are you using some validation to show or hide the confirmation box?
It would likely be helpful to know what the code in your competent/not competent buttons is, as within a list component you will generally be referring to {{ i }}
or {{ ri ]}}
to indicate actions for a specific item in the list. Is the confirmation box a component with each list container?
Once other note: when you are in edit mode and you unhide a component in a list, it generally unhides for all instances in a list. This behaviour is different when in preview/live mode for the app. Can you confirm that when you click the button in preview/live mode all of the confirmation boxes for all items in the list are opening?
Hi @shubham1! Welcome to the community.
It's a little hard to tell how your app is put together just by looking at the screenshots you've shared, which makes it challenging to figure out what might be happening here. If possible, sharing a JSON export of your app would likely help me to resolve this more quickly!
As your fellow community members pointed out, the structure of individual containers in a list view can't really be customized. That said, it's still possible to access and manipulate the properties - like hidden
- of individual nested components. I put together a simple example (Sandbox.json) demonstrating this.
It does actually look like the behavior you're seeing might be unique to the editing environment. Let us know if you see the same thing when viewing the app as a user!