Modal that doesn't require a Modal button

Some of my apps that I've built that are action based and non multi app have big sections that look like this:

These are all hidden modal buttons - most of the time I like to trigger modals not using the modal button but based on a user's actions - hence all the clutter of hidden modal buttons. Is there anyway that we could create modals without having a hidden button on the page, this would make the workspace quite a bit cleaner :slight_smile: Thanks!

10 Likes

Hey Joey!

This would be a great feature, I've gone ahead and written this up as an internal feature request and added you to it. I will update this thread as I have more news on this! :)

4 Likes

Also looking for the exact same thing. Good for prompts + asking for more info before proceeding.

Would events be a solution for this? May 14, 2021 - Retool

Create modal in an event handler would be amazing

I apologize, I misunderstood. You would still need to have the model button hidden on the screen. Events just allow you to trigger (open/close) the modal without a JS Query now.

+1 for modals without the need to create a button

+1 for this.

We had a modal where clicking the button triggered the query displayed in the popup.

This was bad because the popup displayed before the query it displays was ready.

So the solution is to chain them together.

  1. Have a button that triggers a query.
  2. Add an onSuccess handler to the query that then opens a popup.
  3. Display the results of the query in the popup.

However, to do that we need to be able to trigger a popup (i.e. modal) from a query without a button.

For the moment, I'm going to use a hidden button, but this sucks.

+1

Modals should be served up in event handlers, rather than tied to a button component (with limited customisability vs the actual button component - no icons!), so they can be triggered from other components (tables, split buttons, inputs etc.) and queries.

3 Likes

+1

Isn't this feature already implemented? I can create a modal in the component tree with no button and activate it however I want.

image

1 Like

Yes, this in now available! Thanks @khill-fbmc :grinning:.

1 Like