TW-Elements
TW-Elements copied to clipboard
Toast dismissing not working
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!
Any tips how to fix this?
@Taarek @joergrech did you try using data-bs-dismis
instead of data-mdb-dismiss
? 🤔
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)