How can I clear an image grid?

Hello,
I'm new to Retool and I'm trying to clear an image grid when a user selected a new row in an adjacent table. I was thinking of adding an event handler "row click" on the table to call a JS script. That script would clear the image grid; but I don't know how to write this piece ...
I tried:

{{ image_grid.data == [] }}

Thanks for the help! :pray:

You can use a temp state to set the value of that image grid and then change the temp state to be null when the row is clicked

Screenshot 2023-04-07 at 11.54.22 AM

Screenshot 2023-04-07 at 11.49.27 AM