Topic: Select setValue does not work as documented and as expected
UNNdev priority asked 2 years ago
First of all, I am really frustrated and annoyed in the meanwhile that basic functionality of the components I've just started using is buggy as hell and that the only feedback I get is "we'll look into it" with no ETA when the problems are going to be fixed. I have to spend a lot of my time finding work-arounds for bugs or quirks that should've been found during a QA process on your side especially since we don't get the components for free and a lot of MDB's functionality is built around the free Bootstrap library.
setValue method of the Select component does what the documentation says and sets the value of the Select to the given string or array no matter which option was previously selected.
setValue does not reset the
selected attribute of the
option elements. In the code snippet linked below, click on the button that calls
setValue(['7', '8']). Instead of having the value set to 7 and 8, you end up with 1, 4, 7, 8.
Resources (screenshots, code snippets etc.)
Hello, thank you for reporting this issue. We will fix this asap. By the time we fix this I recommend you using this workaround.
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Priority
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 3.8.1
- Device: PC
- Browser: Chrome
- OS: Windows 10
- Provided sample code: Yes
- Provided link: Yes