Topic: mdb-autocomplete-clear
if we have two or more inputs with type=search and autocomplete, once you enter something in one input, all the other inputs will show the mdb-autocomplete-clear cross.
It seems the function is not applying the visibility just to $(this) input but to all .mdb-autocomplete-clear.
once clicked, it works the way it should.
I've analysed the code and found a workaround.
Just make sure all the inputs type=search are inside different div's and change de mdb code to $("#"+n[0].offsetParent.attributes[1].nodeValue+" .mdb-autocomplete-clear").css("visibility", "visible").
this way it will get the nodeValue or better saying "the id" of the previous tag, so it doesn't meter if it is a <div> or a <h1>
For me it works like a sharm, but it could also be done differently.
Add comment
Piotr Glejzer staff answered 6 years ago
Hello,
thank you very much for your fix.
Best,
Piotr
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Answered
Specification of the issue
- User: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.5.10
- Device: mac
- Browser: chrome
- OS: ios
- Provided sample code: No
- Provided link: No
Tags
Related topics