FluentSelect selected item not changing when using mouse + keyboard
🐛 Bug Report
When entering a <FluentSelect> with mouse and then using the keyboard to change the selected item, the events are not triggered. The selection is NOT changed.
Note: Using ONLY keyboard is working fine. Using ONLY mouse will work as well.
💻 Repro or Code Sample
Just go to the fluent-ui-blazor.net site. Enter de dropdown in the section
#From a List of Option<T> items https://www.fluentui-blazor.net/Select
Step1 | Focus with mouse click. Step 2 | Change value with keyboard.
Then you'll notice that the Value is not changed
From a List of Option<string> items
Second item in the list is initially selected through the OptionSelected (Func delegate) parameter.
<FluentSelect Items=@stringOptions1 OptionText="@(i => i.Text)" OptionValue="@(i => i.Value)" OptionSelected="@(i => i.Selected)" @bind-Value="@stringValue" />
Selected Value: @stringValue
🤔 Expected Behavior
Value should be changed
😯 Current Behavior
Value not changing
💁 Possible Solution
Event not triggered?
🔦 Context
Changes aren't saved correctly because the value hasn't been updated.
🌍 Your Environment
.NET 8 Windows 10 NB. The issue is on the demo website as well.
Indeed, the Value value is not updated, but the SelectedOption element is correctly updated.
Until this is corrected, you can use SelectedOption.
I'm addressing this as part of the work in progress for #2813