Close modal with js and remove the done button?

Is it possible to hide the “done” button of a modal? I’ve got a modal that pops up that I want to close with js instead of using the done button.

And how would you do it with js?

Hi @BobandBill Apologies for the delay here! Are you referring to the modal component?

If so, you can close the modal with modalName.close() in Javascript! I believe you'd have to use custom css to hide the x

I see that this is a mobile question so definitely let me know if you're referring to a different modal!

It’s a mobile question. So mobile has this navigation feature to open in a modal screen. It doesn’t have a modal component right? The editor in your screenshot looks different from mine. I think your example is about the normal retool and not the mobile retool.

Ah, I see what you mean now, thanks!

It doesn't look configurable yet, but I'm reaching out to the mobile team with a feature request for this. I'll post back here when it ships

1 Like