diff --git a/examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml b/examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml index dd7dd1d280..974e1e6881 100644 --- a/examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml +++ b/examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml @@ -8270,7 +8270,7 @@ - Gets or sets the icon drawing and fill color. + Gets or sets the icon drawing and fill color. Value comes from the enumeration. Defaults to Accent. diff --git a/examples/Demo/Shared/Pages/Rating/Examples/RatingDefault.razor b/examples/Demo/Shared/Pages/Rating/Examples/RatingDefault.razor index c77308bce6..b4bbb63893 100644 --- a/examples/Demo/Shared/Pages/Rating/Examples/RatingDefault.razor +++ b/examples/Demo/Shared/Pages/Rating/Examples/RatingDefault.razor @@ -1,6 +1,7 @@ @LabelText diff --git a/src/Core/Components/Rating/FluentRating.razor b/src/Core/Components/Rating/FluentRating.razor index ac352ec85c..43570b6501 100644 --- a/src/Core/Components/Rating/FluentRating.razor +++ b/src/Core/Components/Rating/FluentRating.razor @@ -3,7 +3,8 @@ @if (!string.IsNullOrEmpty(Label) || LabelTemplate is not null) { - @LabelTemplate + @LabelTemplate + _labelUsed = true; } @foreach (var index in Enumerable.Range(1, Max)) @@ -28,7 +30,6 @@ { OnClickAsync(index, fromFocus: true))" /> { private bool _updatingCurrentValue = false; private int? _hoverValue = null; + private bool _labelUsed; /// protected override string? ClassValue => new CssBuilder(base.ClassValue) @@ -37,7 +38,7 @@ public partial class FluentRating : FluentInputBase public Icon IconOutline { get; set; } = new CoreIcons.Regular.Size20.Star(); /// - /// Gets or sets the icon drawing and fill color. + /// Gets or sets the icon drawing and fill color. /// Value comes from the enumeration. Defaults to Accent. /// [Parameter] diff --git a/tests/Core/Rating/FluentRatingTests.FluentRating_Label.verified.razor.html b/tests/Core/Rating/FluentRatingTests.FluentRating_Label.verified.razor.html index afa83bb68a..bb3413d7ef 100644 --- a/tests/Core/Rating/FluentRatingTests.FluentRating_Label.verified.razor.html +++ b/tests/Core/Rating/FluentRatingTests.FluentRating_Label.verified.razor.html @@ -1,25 +1,25 @@ My Label - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + +