-
Notifications
You must be signed in to change notification settings - Fork 461
Closed
Labels
triageNew issue. Needs to be looked atNew issue. Needs to be looked at
Description
🐛 Bug Report
The grid does not recognize that the list of columns has changed and thus does not reevaluate the width calculation
💻 Repro or Code Sample
https://www.fluentui-blazor.net/#dynamiccolumns click any of the column button, see that tables style is static at grid-template-columns: 100px 200px;
🤔 Expected Behavior
when all 3 cols are shown, it updates to grid-template-columns: 100px 200px 200px; to match the column widths
😯 Current Behavior
Nothing happens on click
💁 Possible Solution
Hacked workaround:
<FluentDataGrid @ref="Grid" ... GridTemplateColumns="@HackColumnWidthBroken">
...
@code {
private async Task OpenChooseColumnsDialog()
{
var dialog = await DialogService.Show(DialogHelper.From<MyColumnSelector>(), State, parameters);
var res = await dialog.Result;
if (!res.Cancelled)
{
HackColumnWidthBroken += " ";
await Grid.RefreshDataAsync();
}
}
}this is working because Grid.OnParametersSetAsync only checks for null on GridTemplateColumns, but FinishCollectingColumns use string.IsNullOrWhiteSpace(GridTemplateColumns), which in itself is a bug.
Metadata
Metadata
Assignees
Labels
triageNew issue. Needs to be looked atNew issue. Needs to be looked at