Topic: Using plain js version inside Vue, possible?
BigMonkey pro asked 1 year ago
Uncaught (in promise) TypeError: mdb.Alert.getInstance(...) is null
Is there something about the plain version of MDB5 which prevents component js from working inside Vue3?
I'm doing a simple testing with Alert component being triggered on button press and no matter what Alert.getInstance() method returns null. It's 100% being passed a valid element.
Here is a working demo of the issue in a sandbox. It shows 2 different ways I'm attempting to call the hide() method on Alert obj.
There is dedicated documentation for apps in Vue (see Alerts: https://mdbootstrap.com/docs/b5/vue/components/alerts/).
Tested exactly the same code in stand alone plain html/js page and it works. So there's something about Vue that prevents the plainJS MDB components from working.
Is someone monitoring Facebook messages on your page? I need to switch from Vanilla JS to Vue3 version.
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Pro
- Premium support: No
- Technology: MDB Standard
- MDB Version: MDB5 3.9.0
- Device: Desktop
- Browser: Firefox
- OS: Win10
- Provided sample code: No
- Provided link: No