Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 313ee50

Browse files
authored
Indication for isNull/isNotNull in simple datagrid filter (#1127)
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.
1 parent fca72e3 commit 313ee50

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Radzen.Blazor/RadzenDataGrid.razor

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,17 @@
174174
<i class="rzi">date_range</i>
175175
</button>
176176
var filterValue = column.GetFilterValue();
177+
var filterOperator = column.GetFilterOperator();
177178
@if (filterValue != null && filters.Any(d => d.Property == column.GetFilterProperty()))
178179
{
179180
<span class="rz-current-filter">@string.Format("{0:" + getFilterDateFormat(column) + "}", filterValue)</span>
180181
<i @onclick="@((args) => ClearFilter(column))" class="rzi rz-cell-filter-clear">close</i>
181182
}
183+
else if ((filterOperator == FilterOperator.IsNull || filterOperator == FilterOperator.IsNotNull) && filters.Any(d => d.Property == column.GetFilterProperty()))
184+
{
185+
<span class="rz-current-filter">@column.GetFilterOperatorText(filterOperator)</span>
186+
<i @onclick="@((args) => ClearFilter(column))" class="rzi rz-cell-filter-clear">close</i>
187+
}
182188
<div id="@($"{PopupID}{column.GetFilterProperty()}")" class="rz-overlaypanel"
183189
style="display:none;width:550px;" tabindex="0">
184190
<div class="rz-overlaypanel-content">

0 commit comments

Comments
 (0)