Fix filter popups: close other DataGrid column popups in Initial mode; stop PivotDataGrid filter popup double-toggle

This commit is contained in:
Vladimir Enchev
2026-06-25 10:12:33 +03:00
parent 4792eb0222
commit dab925cc32
2 changed files with 7 additions and 10 deletions

View File

@@ -426,13 +426,6 @@ else
if (Grid.FilterPopupRenderMode == PopupRenderMode.OnDemand && popup != null)
{
await popup.ToggleAsync(filterButton);
Grid.allColumns
.Where(c => c.GetVisible() && c.UniqueID != Column.UniqueID)
.Select(c => c.headerCell)
.Where(cell => cell != null)
.ToList()
.ForEach(cell => InvokeAsync(cell!.CloseFilter));
}
else if (Grid.FilterPopupRenderMode == PopupRenderMode.Initial)
{
@@ -442,6 +435,13 @@ else
await jsRuntime.InvokeVoidAsync("Radzen.togglePopup", filterButton, Column.GetColumnPopupID(), false, null, null, true, true);
}
}
Grid.allColumns
.Where(c => c.GetVisible() && c.UniqueID != Column.UniqueID)
.Select(c => c.headerCell)
.Where(cell => cell != null)
.ToList()
.ForEach(cell => InvokeAsync(cell!.CloseFilter));
}
async Task ClearFilter()

View File

@@ -120,7 +120,6 @@
{
<button type="button" @ref=FilterIconRef[filterIconRefKey] @onclick:stopPropagation="true"
@onmousedown="@(() => { if (row != null) _ = ToggleFilter(row, filterIconRefKey); })"
@onclick="@(() => { if (row != null) _ = ToggleFilter(row, filterIconRefKey); })"
class="@(row != null ? GetFilterIconCss(row) : "")"
aria-label="@FilterText" aria-haspopup="dialog"
aria-controls="@($"pivot-filter-{row?.Property}")" aria-expanded="false">
@@ -175,7 +174,6 @@
{
<button type="button" @ref=FilterIconRef[filterIconRefKey] @onclick:stopPropagation="true"
@onmousedown="@(() => { if (column != null) _ = ToggleFilter(column, filterIconRefKey); })"
@onclick="@(() => { if (column != null) _ = ToggleFilter(column, filterIconRefKey); })"
class="@(column != null ? GetFilterIconCss(column) : "")"
aria-label="@FilterText" aria-haspopup="dialog"
aria-controls="@($"pivot-filter-{column?.Property}")" aria-expanded="false">
@@ -230,7 +228,6 @@
{
<button type="button" @ref=FilterIconRef[filterIconRefKey] @onclick:stopPropagation="true"
@onmousedown="@(() => { if (column != null) _ = ToggleFilter(column, filterIconRefKey); })"
@onclick="@(() => { if (column != null) _ = ToggleFilter(column, filterIconRefKey); })"
class="@(column != null ? GetFilterIconCss(column) : "")"
aria-label="@FilterText" aria-haspopup="dialog"
aria-controls="@($"pivot-filter-{column?.Property}")" aria-expanded="false">