Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -8482,12 +8482,6 @@
Gets or sets a value indicating whether the active indicator is displayed.
</summary>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentTabs.ShowOverflow">
<summary>
Gets or sets whether tabs can overflow
Default is set to true to maintain original behavior.
</summary>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentTabs.ChildContent">
<summary>
Gets or sets the content to be rendered inside the component.
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Components/DataGrid/Columns/ColumnBase.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public abstract partial class ColumnBase<TGridItem>
/// <summary>
/// Gets a reference to the enclosing <see cref="FluentDataGrid{TGridItem}" />.
/// </summary>
public FluentDataGrid<TGridItem> Grid => InternalGridContext.Grid;
protected FluentDataGrid<TGridItem> Grid => InternalGridContext.Grid;

/// <summary>
/// Event callback for when the row is clicked.
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Components/DataGrid/Columns/PropertyColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected override void OnParametersSet()
{
var value = compiledPropertyExpression!(item);

if (typeof(TProp).IsEnum)
if (typeof(TProp).IsEnum || typeof(TProp).IsNullableEnum())
{
return (value as Enum)?.GetDisplayName();
}
Expand Down
7 changes: 6 additions & 1 deletion src/Core/Extensions/EnumExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ public static string GetDisplayName(this Enum enumValue)
{
var memberInfo = enumValue.GetType().GetMember(enumValue.ToString());
var displayAttribute = memberInfo[0].GetCustomAttribute<DisplayAttribute>();
return displayAttribute?.Name ?? enumValue.ToString();
return displayAttribute?.GetName() ?? enumValue.ToString();
}

public static bool IsNullableEnum(this Type t)
{
return Nullable.GetUnderlyingType(t)?.IsEnum == true;
}
}