-
Notifications
You must be signed in to change notification settings - Fork 423
[Combobox] Fix GetOptionValue #3739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 59.6%
|
Are we sure this returns the correct value for a Combobox in the case of editing in the text box part (ie when not selecting an item from the list of options). I recall we had issues there before. |
Good question. I will check this case. |
@vnbaaij You're right. I updated the code to display the beforeafterI used this code to validate: <FluentCombobox Items=@stringOptions
OptionText="@(i => i.Text)"
OptionValue="@(i => i.Value.ToString())"
@bind-Value="@stringValue"
@bind-SelectedOption="selectedOption" />
<div>
Selected Value: @stringValue
</div>
<div>
Selected Option Text: @selectedOption?.Text
</div>
<div>
Selected Option Value: @selectedOption?.Value
</div>
@code {
string? stringValue;
Option<int>? selectedOption;
List<Option<int>> stringOptions = new()
{
{ new Option<int> { Value = 1, Text = "One" } },
{ new Option<int> { Value = 2, Text = "Two"} },
{ new Option<int> { Value = 3, Text = "Three" } }
};
} Can you double check before to merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed it works as supposed
Fix combobox GetOptionValue
The correct
GetOptionValue
is already included in theListComponentBase
class.#3734