MudSelect: Changing the bound Value does not fire SelectedValuesChanged event and does not perform required check
Bug type
Component
Component name
MudSelect
What happened?
There is a list of strings in a MudSelect. If I change the value of the variable bound to MudSelect, the value is changed but the SelectedValuesChanged event is not fired and also the required check is not executed.
Expected behavior
SelectedValuesChanged event is fired and the required check is performed.
If I use the MudSelect<T>.SelectOption() method based on the reference to the MudSelect, the SelectedValuesChanged event is fired and the Required check is also performed.
Reproduction link
https://try.mudblazor.com/snippet/cOQbujGLxTJQqiiD
Reproduction steps
- Select a value by Button "Select this Item by binded value" => No Event Fired Messge appears.
- Clear the select field => The Required-Check is performed and the Event Fired Message is displayed.
- use the button "Select this Item by binded value" on more time => No Event Fired Messge appears. => The Field is still marked as required. The Required-Error-Message is displayed
- Using the Button "Select this Item by ref-Object" sets the value to the selected one and the Event Fired Message is displayed.
Relevant log output
Nothing
Version (bug)
v.5.1.4
Version (working)
No response
What browsers are you seeing the problem on?
Firefox
On what operating system are you experiencing the issue?
Windows
Pull Request
- [ ] I would like to do a Pull Request
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Could be a similar problem as in #2852.
@henon is this an expecting result?
Changing the bound-Value
Hi. We are just stuck on this problem. It is very annoying. Is there any workaround for it?
@MooWeek Does it annoy you enough so you maybe try to fix it and PR?
Running into this issue now as well. I don't have the time to submit a PR. Bummer was hoping most of these issues would have been resolved in MudBlazor by now. I agree with @henon that we need more contributors. I ended up using CodeBeamExtensions
It seems this issue is fixed? - If you need to use "SelectedValuesChanged" then you have to use "SelectedValues" in place of "@bind-SelectedValues".