Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
enchev committed Aug 28, 2023
2 parents 82610e2 + e9b3213 commit a04cbeb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 6 additions & 0 deletions Radzen.Blazor/RadzenDataGrid.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,12 @@ internal IReadOnlyDictionary<string, object> FooterCellAttributes(RadzenDataGrid
[Parameter]
public DataGridEditMode EditMode { get; set; } = DataGridEditMode.Multiple;

/// <summary>
/// Gets or set the filter icon to use.
/// </summary>
[Parameter]
public string FilterIcon { get; set; } = "filter_alt";

/// <summary>
/// Gets or sets the filter text.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Radzen.Blazor/RadzenDataGridFilterMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@using Microsoft.JSInterop
@inject IJSRuntime JSRuntime
<button title=@Column.GetFilterOperatorText(Column.GetFilterOperator()) class="@FilterIconStyle()" onclick="@($"Radzen.togglePopup(this.parentNode, '{Grid.PopupID}{Column.GetFilterProperty()}')")">
<i class="rzi">filter_alt</i>
<i class="rzi">@Grid.FilterIcon</i>
@if (Column.GetFilterOperator() == FilterOperator.DoesNotContain)
{
<s>@Column.GetFilterOperatorSymbol(Column.GetFilterOperator())</s>
Expand Down
4 changes: 3 additions & 1 deletion Radzen.Blazor/RadzenDataGridHeaderCell.razor
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
@if (Grid.AllowFiltering && Column.Filterable && Grid.FilterMode == FilterMode.Advanced)
{
<i @ref=@filterButton @onclick:stopPropagation="true" @onmousedown=@ToggleFilter
class="@getFilterIconCss(Column)" onclick=@getFilterOpen() />
class="@getFilterIconCss(Column)" onclick=@getFilterOpen() >
@Grid.FilterIcon
</i>

<Popup Lazy=@(Grid.FilterPopupRenderMode == PopupRenderMode.OnDemand) @ref=popup id="@($"{getColumnPopupID()}")" class="rz-overlaypanel"
style="display:none;min-width:250px;" tabindex="0">
Expand Down
4 changes: 0 additions & 4 deletions Radzen.Blazor/themes/components/blazor/_grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1018,10 +1018,6 @@ $column-draggable-shadow: 0 8px 10px 0 rgba(0, 0, 0, 0.1) !default;
cursor: pointer;
color: var(--rz-grid-header-filter-icon-hover-color);
}

&:after {
content: 'filter_alt';
}
}

.rz-grid-filter-active {
Expand Down

0 comments on commit a04cbeb

Please sign in to comment.