[how to] render data conditionally in a modal after clicking a table row

hey @stefancvrkotic thank you for welcoming me to the community and lending help with this issue of mine!

I ended up getting my problem resolved. While your suggested solution didn't work for me it did help me look around in my Retool app and Retool doc a bit more. Here's what I did:

  • KISS. I know I need to simply display the parsed extra_tags in my API response data. So, I started looking into where data is injected a Component and found the Data Resource section which you highlighted in your second screenshot.

  • I know I want to add a new row if my JavaScript object has the attribute extra_tags. So, I added an Event Handler on the Modal Button. And configured in way that it Querys a JavaScript file on trigger. I named it rowOpenHandler.

  • Inside rowOpenHandler, I parsed the extra_tags and found a way to add data to a row. i.e. table2.setData([])

And that did the trick!

Other things I've considered were using temporaryState but turns out I don't even need it.

A similar case found in Retool forum

Thanks for your help!

1 Like