Modals inside a Table

I create a custome field in a table to add a modal, i use it to pass the selected row data and modify it, I added a buttonwhich trigger the update query. My question is how to close the modal window after the update query finish? i cant get the modal reference

Hey @daveAS,

Modal columns have a little less functionality compared to standalone modals. .open() and .close() for example aren't accessible right now.

I suggest you implement a standalone modal and bind it to the cell you want.

I sometimes wonder if Retool has only an "Open policy", I can only see that I can open or show objects, but close functions are missing :slight_smile:
The same I experienced with show form. There is a show function but no function to hide the form.

Hey @riskaone!

Whether or not to show a component is typically handled through it's hidden property which can be set either by using a setHidden method on the component, or by passing a dynamic value to the "Hidden" field in the component's settings:

setHidden function:

Passing a temp state to a "Hidden" field:

Forms are a little different in that they have specific properties for their header, body, and footer. Each with its own set method!

Does that match the functionality you're looking for?

Modals in tables have a bit less functionality as @minijohn mentioned. It's something the dev team is aware of though and if they're brought into greater parity I can report back here!

2 Likes

Hello @Kabirdas , thank you for your response. The note you described sorts out several things I need. I got the show/hide in other places. I can't recall exactly where it happened. So let's park it for now. I'll let you/your team know when I encounter these again.