Topic: MaterialSelect Search on IE 11

Thomas Emmanuel free asked 4 years ago

*Expected behavior*Material Select search should search though all the ul li items

*Actual behavior*On search it gives an error "SCRIPT438: Object doesn't support property or method 'includes - mdb.min.js (9750,63)'"

            n.find("li span.filtrable").each(function () {
                    var e = t(this);
                    "string" == typeof this.outerHTML &&(this.textContent.toLowerCase().includes(o.toLowerCase()) ? :             e.hide().parent().hide())

Resources (screenshots, code snippets etc.)

Piotr Glejzer staff answered 4 years ago

We do not fully support IE. But if you will change :

(this.textContent.toLowerCase().includes(o.toLowerCase()) ? :  hide().parent().hide())


(this.textContent.toLowerCase().indexOf(o.toLowerCase() > -1) ? :  hide().parent().hide())

It should work.

Thomas Emmanuel free commented 4 years ago

Hi @Piotr Glejzer

Thanks for the response.

I tried changing 'includes' to 'indexOf'. It doesn't give me an error but the search doesn't work. Doesn't work in ie/firefox/chrome also.

Any other work around?

Regards Prashanth

Thomas Emmanuel free commented 4 years ago

Hi @Piotr Glejzer

Issue is solved.

indexOf(element) !== -1

This helped me.


Please insert min. 20 characters.


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



Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.8.0
  • Device: Lenovo
  • Browser: ie 11
  • OS: Windows
  • Provided sample code: No
  • Provided link: No