Skip to content

Commit 698fb1e

Browse files
authored
Use ColumnOptonsLabels.Icon so devs can choose which icon to use. Default remains unchanged (#3865)
1 parent b45bcd3 commit 698fb1e

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/Core/Components/DataGrid/Columns/ColumnBase.razor

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@
153153
<FluentIcon Value="@(new CoreIcons.Regular.Size20.ArrowSortDown())" Slot="end" Style="opacity: var(--fluent-data-grid-header-opacity);" />
154154
}
155155
}
156-
@if (ColumnOptions is not null && Filtered.GetValueOrDefault() && Grid.ResizeType is not null)
156+
@if (ColumnOptions is not null && Filtered.GetValueOrDefault())
157157
{
158-
<FluentIcon Value="@(new CoreIcons.Regular.Size20.Filter())" Slot="end" Style="opacity: var(--fluent-data-grid-header-opacity);" />
158+
<FluentIcon Value="@(Grid.ColumnOptionsLabels.Icon)" Slot="end" Style="opacity: var(--fluent-data-grid-header-opacity);" />
159159
}
160160
</FluentButton>
161161
</FluentKeyCode>
@@ -168,7 +168,7 @@
168168
@if (ColumnOptions is not null && Filtered.GetValueOrDefault() && Grid.ResizeType.HasValue)
169169
{
170170
<span style="padding: 0 5px;">
171-
<FluentIcon Value="@(new CoreIcons.Regular.Size20.Filter())" Slot="end" Style="opacity: var(--fluent-data-grid-header-opacity);" />
171+
<FluentIcon Value="@(Grid.ColumnOptionsLabels.Icon)" Slot="end" Style="opacity: var(--fluent-data-grid-header-opacity);" />
172172
</span>
173173
}
174174
</div>
@@ -215,15 +215,7 @@
215215
{
216216
return
217217
@<FluentButton Appearance="Appearance.Stealth" class="col-options-button" @onclick="@(() => Grid.ShowColumnOptionsAsync(this))" aria-label="Filter this column">
218-
@if (Filtered.GetValueOrDefault())
219-
{
220-
<FluentIcon Value="@(new CoreIcons.Regular.Size20.FilterDismiss())" />
221-
}
222-
else
223-
{
224-
<FluentIcon Value="@(new CoreIcons.Regular.Size20.Filter())" />
225-
}
226-
227-
</FluentButton>;
218+
<FluentIcon Value="@(Grid.ColumnOptionsLabels.Icon)" />
219+
</FluentButton>;
228220
}
229221
}

0 commit comments

Comments
 (0)