T
TanStack•2y ago
stormy-gold

Changing cells based on state of another cell

I would like to change the content displayed in a cell based on the content in another cell. I'm not looking for a full or even partial code solution, I was just hoping someone might be able to point me in the right direction (e.g., is this something that can be done out-of-the-box?). I've described what I want to do to below, but if you have any questions, please let me know 🙂 Use Case I have a table that displays data for actors in movies and tv shows. There's a column for images that contains links to images. There's sometimes 20+ images for a single actor, so I changed the columns to have a button that says "Show images" that reveals the links when clicked. When the "Show images" button is clicked, it becomes a "Hide images" button that hides the links when clicked. This is all working, however, I would like to automatically hide the images if the "Show images" button is clicked for a different actor/row. In other words, I only want to display links for one actor at time. In my head, it seems fairly simple. I just need to keep track of the ID of the cell when the "Show images" button is clicked, and then use the ID to update the cell when the "Show images" button is clicked again.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?