MudSelect: Changing the bound Value does not fire SelectedValuesChanged event and does not perform required check
See original GitHub issueBug 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
- I agree to follow this project’s Code of Conduct
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
c# - Which event in a MudBlazor MudSelect is called when ...
1 Answer. You can use ValueChanged event callback which is fired when the Value property changes.
Read more >MudSelect<T> API
Name Type Default
SelectedValues IEnumerable
Text string null
Value T null
Read more >How to handle the ValueChanged event and use forms and ...
Handling the ValueChanged event exposed from inputs interferes with two-way binding through @bind-Value and thus, with validation.
Read more >Need help with MudSelect MudBlazor (comparison ...
My new go to is Mud because it's native and clean. But may not be to everyone's taste.
Read more >MudBlazor simple syntax various errors in Cascade ...
When using @bind-Value you do not use Value= or ValueChanged= ... when the value changed if I remove the ValueChanged event, or I...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Changing the bound-Value
@MooWeek Does it annoy you enough so you maybe try to fix it and PR?