JS Error after MDB 5 update


Topic: JS Error after MDB 5 update

savedm asked 4 years 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 commented 4 years ago

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


Grzegorz Bujański staff commented 4 years 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 commented 4 years 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 commented 4 years 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 4 years 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 commented 4 years ago

Thank you Grzegorz! It's working now!


Grzegorz Bujański staff commented 4 years ago

You're welcome :)


savedm answered 4 years 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.

FREE CONSULTATION

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

Status

Resolved

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