Skip to content

Commit

Permalink
Indication for isNull/isNotNull in simple datagrid filter (#1127)
Browse files Browse the repository at this point in the history
Added an Indication for when a datagrid (in simple mode)'s filter operator is set to either "is null" or "is not null". Before there was no way to see that any filters were applied until the popup was opened.
  • Loading branch information
mvoxland-MoorheadSchools authored Aug 28, 2023
1 parent fca72e3 commit 313ee50
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Radzen.Blazor/RadzenDataGrid.razor
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,17 @@
<i class="rzi">date_range</i>
</button>
var filterValue = column.GetFilterValue();
var filterOperator = column.GetFilterOperator();
@if (filterValue != null && filters.Any(d => d.Property == column.GetFilterProperty()))
{
<span class="rz-current-filter">@string.Format("{0:" + getFilterDateFormat(column) + "}", filterValue)</span>
<i @onclick="@((args) => ClearFilter(column))" class="rzi rz-cell-filter-clear">close</i>
}
else if ((filterOperator == FilterOperator.IsNull || filterOperator == FilterOperator.IsNotNull) && filters.Any(d => d.Property == column.GetFilterProperty()))
{
<span class="rz-current-filter">@column.GetFilterOperatorText(filterOperator)</span>
<i @onclick="@((args) => ClearFilter(column))" class="rzi rz-cell-filter-clear">close</i>
}
<div id="@($"{PopupID}{column.GetFilterProperty()}")" class="rz-overlaypanel"
style="display:none;width:550px;" tabindex="0">
<div class="rz-overlaypanel-content">
Expand Down

0 comments on commit 313ee50

Please sign in to comment.