How to set Toast Message


Topic: How to set Toast Message

twoeyes pro premium priority asked 3 years ago

Expected behavior I'd like to set / change the Toast Message text dynamic by passing the text to the instance or so ...

Actual behavior I can not find a js method like it exists in the MDB4 version:

toastr.success('Have fun storming the castle!', 'Miracle Max Says')

Resources (screenshots, code snippets etc.)


Dawid Wajszczuk staff answered 3 years ago

Hi,

You can try the solution provided by one of our users https://github.com/jordm/easy-toast. It basically should bring back this missing functionality from MDB4.

The other solution would be to render Toasts via JS. Here is the snippet with basic example https://mdbootstrap.com/snippets/standard/d-wajszczuk/3192891#js-tab-view. Just modify it to fit your needs.

Keep coding,
Dawid


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.8.1
  • Device: --
  • Browser: --
  • OS: --
  • Provided sample code: No
  • Provided link: No
Tags