TW-Elements icon indicating copy to clipboard operation
TW-Elements copied to clipboard

Toast dismissing not working

Open Taarek opened this issue 2 years ago • 2 comments

It's not possible to have the Toast either automatically hide, or be able to dismiss it manually. Even the basic example from https://tailwind-elements.com/docs/standard/components/toast/ doesn't work.

It's not an issue with the JS lib not being loaded in correctly, because other components works just fine (i.e alerts dismissing and dropdowns)

Apologies if I'm doing anything wrong, but I've been going around scratching my head about this for a little while now, so appreciate any advice!

Taarek avatar Jun 29 '22 15:06 Taarek

Any tips how to fix this?

joergrech avatar Jul 10 '22 10:07 joergrech

@Taarek @joergrech did you try using data-bs-dismis instead of data-mdb-dismiss? 🤔

jdnichollsc avatar Aug 05 '22 02:08 jdnichollsc

Neither data-bs-dismis nor data-bs-dismiss works in that way - with the last one (data-bs-dismiss) I get:

Uncaught TypeError: Cannot read properties of undefined (reading 'classList')
    at o.value (toast.js:112:24)
    at HTMLButtonElement.<anonymous> (component-functions.js:28:14)
    at HTMLDocument.t (event-handler.js:119:21)

joergrech avatar Oct 18 '22 11:10 joergrech