Skip to content

Commit c5c656c

Browse files
Fix selected items are being displayed in placeholder color when a binding other than SelectedOption is being used (#4760)
1 parent 97b2ec3 commit c5c656c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Core/Components/List/FluentSelect.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public partial class FluentSelect<TOption> : ListComponentBase<TOption> where TO
2424
.AddStyle($"#{Id}::part(selected-value)", "white-space", "nowrap")
2525
.AddStyle($"#{Id}::part(selected-value)", "overflow", "hidden")
2626
.AddStyle($"#{Id}::part(selected-value)", "text-overflow", "ellipsis")
27-
.AddStyle($"#{Id}::part(selected-value)", "color", "var(--input-placeholder-rest)", when: !string.IsNullOrEmpty(Placeholder) && SelectedOption is null)
27+
.AddStyle($"#{Id}::part(selected-value)", "color", "var(--input-placeholder-rest)", when: !string.IsNullOrEmpty(Placeholder) && SelectedOption is null && string.IsNullOrEmpty(Value) && SelectedOptions is null)
2828
.BuildMarkupString();
2929

3030
protected override string? StyleValue => new StyleBuilder(base.StyleValue)

0 commit comments

Comments
 (0)