Skip to content

Commit cff6e5f

Browse files
authored
Fix #3212 by setting FluentComponentBase.Element to a correct value. (#3222)
1 parent 0a44de0 commit cff6e5f

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

examples/Demo/Shared/wwwroot/docs/DesignTokens.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ Given the following `.razor` page fragment:
242242

243243
```cshtml
244244
<FluentButton @ref="ref1">A button</FluentButton>
245-
<FluentButton @ref="ref2" Appearance.Accent>Another button</FluentButton>
245+
<FluentButton @ref="ref2" Appearance="Appearance.Accent">Another button</FluentButton>
246246
<FluentButton @ref="ref3">And one more</FluentButton>
247247
<FluentButton @ref="ref4" @onclick=OnClick>Last button</FluentButton>
248248
```

src/Core/Components/AppBar/FluentAppBar.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@inherits FluentComponentBase
33

44
<CascadingValue TValue="InternalAppBarContext" Value="@_internalAppBarContext" IsFixed="true">
5-
<nav id="@Id" @attributes="AdditionalAttributes" class="@ClassValue" style="@StyleValue" role="navigation" orientation="@Orientation.ToAttributeValue()">
5+
<nav @ref="@Element" id="@Id" @attributes="AdditionalAttributes" class="@ClassValue" style="@StyleValue" role="navigation" orientation="@Orientation.ToAttributeValue()">
66

77
@if (Items is null)
88
{

src/Core/Components/AppBar/FluentAppBar.razor.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
}
3030

3131
::deep div[part="label"] {
32+
color: var(--neutral-foreground-rest);
3233
overflow: hidden;
3334
text-overflow: ellipsis;
3435
white-space: nowrap;

src/Core/Components/DataGrid/FluentDataGrid.razor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
426426
{
427427
if (firstRender && _gridReference is not null)
428428
{
429+
Element = _gridReference.Value;
429430
Module ??= await JSRuntime.InvokeAsync<IJSObjectReference>("import", JAVASCRIPT_FILE.FormatCollocatedUrl(LibraryConfiguration));
430431
try
431432
{

0 commit comments

Comments
 (0)