geekmakersun free asked 1 year ago
Actual behavior I tried and tried and failed Resources (screenshots, code snippets etc.)
You can't use listener like this, because MDB Select is creating new elements via JS. This HTML code is used only to be based on for our Select instance.
This is the way to make it working:
In case of any questions, feel free to ask :)
PS: In the future, if new problem has no relation with the old one, please create new topic. It will help us keeping forum clear.
Trying to output content from a multiselect list to an array "selectedTexts: The array is declared and has global scope.
Any advice welcome
<select class="form-control"style="max-width:100%" multiple data-mdb-visible-options="6" name="ip" id="ip" onchange=" selectedTexts =Array.from(this.selectedOptions).map(x=>x.value??x.text)" multiselect-hide-x="true" placeholder="Please select a Device from Dropdown list"> <option value="1">192.168.1.201</option> <option value="2">192.168.1.202</option> <option value="3">192.168.1.203</option> <option value="4">192.168.1.204</option> <option value="5">192.168.1.205</option> <option value="6">192.168.1.206</option> </select>
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Free
- Premium support: No
- Technology: MDB Standard
- MDB Version: MDB5 3.8.0
- Device: 1
- Browser: 1
- OS: windows
- Provided sample code: No
- Provided link: No