Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/Core/Components/List/ListComponentBase.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -483,14 +483,18 @@ protected virtual bool GetOptionSelected(TOption item)
{
return OptionSelected.Invoke(item);
}
else if (SelectedOption == null)
else if (SelectedOption == null && string.IsNullOrEmpty(Value))
{
return false;
}
else if (OptionValue != null && SelectedOption != null)
{
return GetOptionValue(item) == GetOptionValue(SelectedOption);
}
else if (!string.IsNullOrEmpty(Value) || !string.IsNullOrEmpty(InternalValue))
{
return string.Equals(GetOptionValue(item), Value, StringComparison.Ordinal);
}
else
{
return Equals(item, SelectedOption);
Expand Down
Loading