JS Error after MDB 5 update


Topic: JS Error after MDB 5 update

savedm pro priority asked 2 months ago

Hello

I receive this error after updating mdb 5 npm package.

app.js?id=0ce929fc5b3814b3efb6:9182 Uncaught Error: SELECT: Option "selectAll" provided type "string" but expected type "boolean". ...

There seem to be a problem with the API options in general.

Could you please help?

Thank you


savedm pro priority commented 2 months ago

Could you please help? I need to fix it as soon as possible.


Grzegorz Bujański staff commented 2 months ago

I have checked it locally and unfortunately I am not able to reproduce this error. Please paste the code that causes this error here.


savedm pro priority commented 2 months ago

I am using the PRO Version.

I tried to import the whole library, then also just modules. The problem is that the code breaks. E.g. dropdown is working but the select multiple breaks the code.


savedm pro priority commented 2 months ago

The problem are those options in the Select API, if I remove them it's working else not:

data-filterdata-select-all

Example of one select...


Grzegorz Bujański staff answered 2 months ago

In version 3.0.0 there was a very important change. All JavaScript components are now namespaced to help distinguish MDB functionality from third parties and your own code. Details can be found in our changelog: https://mdbootstrap.com/docs/standard/getting-started/changelog/#v3-0-0 In this case, just use data-mdb-filter and data-mdb-select-all.


savedm pro priority commented 2 months ago

Thank you Grzegorz! It's working now!


Grzegorz Bujański staff commented 2 months ago

You're welcome :)


savedm pro priority answered 2 months ago

The error is generated by this function

.../mdb-ui-kit/src/js/pro/select/util'

function line 116: typeCheckConfig


Please insert min. 20 characters.
Status

Resolved

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB 5
  • MDB Version: 3.0.0
  • Device: Notebook
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No
Tags