Skip to content

Commit

Permalink
Reset _internalGridTemplateColumns to parameter value. Only auto fill…
Browse files Browse the repository at this point in the history
… it if parameter value is null (#3357)
  • Loading branch information
vnbaaij authored Feb 14, 2025
1 parent e5622c8 commit 7ee7ade
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Core/Components/DataGrid/FluentDataGrid.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,6 @@ protected override void OnInitialized()
/// <inheritdoc />
protected override Task OnParametersSetAsync()
{
if (GridTemplateColumns is not null)
{
_internalGridTemplateColumns = GridTemplateColumns;
}

// The associated pagination state may have been added/removed/replaced
_currentPageItemsChanged.SubscribeOrMove(Pagination?.CurrentPageItemsChanged);

Expand Down Expand Up @@ -507,7 +502,7 @@ private void FinishCollectingColumns()
{
if (!AutoFit)
{
_internalGridTemplateColumns = string.Join(" ", Enumerable.Repeat("1fr", _columns.Count));
_internalGridTemplateColumns = GridTemplateColumns ?? string.Join(" ", Enumerable.Repeat("1fr", _columns.Count));
}

if (_columns.Any(x => !string.IsNullOrWhiteSpace(x.Width)))
Expand Down

0 comments on commit 7ee7ade

Please sign in to comment.