I would like to flash error and success messages back to the user using some sort of toast component. The built-in one would be perfect. Can I access it?
Hi @amos! The JS utils.showNotification() function might do what you are looking for: https://docs.retool.com/docs/scripting-retool#section-utils-show-notification-title-description-notification-type
Thanks. Why doesn’t “showNotification” come up when using search? Or ‘utils’ or ‘Utilities’?
ReadMe’s built in search doesn’t do a great job in-depth indexing. I’m looking into replacing it with a more robust system.
*update: got this manually re-indexed
@alex-w is there a way to disable the toast components completely for an application?
Hey @cmiljkovic! Are you referring to the query status notifications that pop up after a success/fail? Or did you want to remove the util.showNotification functionality entirely?
edit: To clarify, you can disable the notification for individual queries, but not globally at the moment
Each query does have the option to hide it’s success notification, or change the message to a custom option if the query is set to run when manually triggered. If the query is set to run when inputs change, that UI is hidden and the notification is disabled by default.
For hiding all notifications in an app, it’s a little hacky, but you can use a text component + custom CSS to target the toast notification and set it to display:none. Here’s what worked for me:
Do keep in mind that users can still call utils.showNotification within the app — we just won’t show anything when it fires.