Materialize: Show only one toast

Created on 4 Apr 2018  路  2Comments  路  Source: Dogfalo/materialize

how can I display only one toast at a time? is there a method, for example, to replace the toast?

Most helpful comment

You can call M.Toast.dismissAll(); before creating a new toast

http://materializecss.com/toasts.html#dismissal

All 2 comments

I don't think there is such a method built-in.

You could set a variable to true when a toast appears and while it's true do not let any other toasts show up. Once the toast dismisses then set it back to false.

You can call M.Toast.dismissAll(); before creating a new toast

http://materializecss.com/toasts.html#dismissal

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexknipfer picture alexknipfer  路  3Comments

heshamelmasry77 picture heshamelmasry77  路  3Comments

locomain picture locomain  路  3Comments

artur99 picture artur99  路  3Comments

serkandurusoy picture serkandurusoy  路  3Comments