Topic: Customize Multi Select Box
Hello MDB-Team,
My goal is to customize the search in the multiSelectBox.
What I have done so far.
I out comment the adding of the Event Handler for the Search in your mdb.js.
Is there a other way to disable the Search Handler?I saw in your mdb.js only when i dont add the searchable Attribute from the MultiSelectBox i can disable the Handler but also lose the Search input field.So i created my Own JavaScript and add the Event Handler that is generate the Search andcreate the new List and Options element and set them to the Html.
I added new Class to the Select 'custom-select' that the Mutli Select Box is not new generate.To this part everthing is working like i want.
Now when i add the new list i lose the Event Handler that are binded to each element that handle the single Select. I tryed to add my own Handler to select the Content und set the Checkbox to selected / not selected but i never get the content send to the Server.I checked the HTML Content when i used your standard MutliSelectBox and cant find a difference to my content.
How do you set the Value from a single Selected Item that it send to the Server ?
Is there a other way to add the new List to the MutliSelectBox without auto reloading it.
With best regards
Kevin
MDBootstrap staff pro premium priority answered 5 years ago
Hi KeHa,
The only way to add a new element to select after this is initialize is to execute initialization again with attribute destroy: true
. This element has a _mutationobserver
function and will update an element depending on the changes in initialization. This is the only supported way of editing this component after initialization.
If you need additional help I am here for you.
Best Regards, Piotr
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB jQuery
- MDB Version: 4.8.10
- Device: Portal
- Browser: All
- OS: Win 10
- Provided sample code: No
- Provided link: No