Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataGrid: Add ability to change filter icons on column headers. #8428

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

sabitertan
Copy link

@sabitertan sabitertan commented Mar 23, 2024

Description

  • Added ability to change filter icons on datagrid column headers
  • Added null check

Replaces: #6238

How Has This Been Tested?

Visually

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

* Added ability to change filter icons on datagrid column headers

* Added null check
Copy link

codecov bot commented Mar 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.89%. Comparing base (9004282) to head (5203440).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #8428      +/-   ##
==========================================
+ Coverage   88.86%   88.89%   +0.02%     
==========================================
  Files         414      414              
  Lines       12297    12301       +4     
  Branches     2455     2460       +5     
==========================================
+ Hits        10928    10935       +7     
+ Misses        838      836       -2     
+ Partials      531      530       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@SigurdEEspersen SigurdEEspersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol was 5 minutes away from creating the PR myself.
Anyways I think you're missing to change the Icon in MudDataGrid.razor line 140 + 144 to the new parameters you've created

@ScarletKuro
Copy link
Member

Hi.
Thanks for the PR. I added @tjscience for review.
Please be patience, as datagrid PRs take a while to review, because the person is busy.

@ScarletKuro ScarletKuro changed the title Filter icon (#1) DataGrid: Add ability to change filter icons on datagrid column headers. Mar 23, 2024
@ScarletKuro ScarletKuro changed the title DataGrid: Add ability to change filter icons on datagrid column headers. DataGrid: Add ability to change filter icons on column headers. Mar 23, 2024
@SigurdEEspersen
Copy link

SigurdEEspersen commented Apr 26, 2024

@ScarletKuro any ETA on this? This seems like a very small feature. Does it have to be tjscience who has to review it, if he haven't got the time?

@ScarletKuro
Copy link
Member

ScarletKuro commented Apr 26, 2024

Hi

@ScarletKuro any ETA on this? This seems like a very small feature. Does it have to be tjscience who has to review it, if he haven't got the time?

This does not depend on me, but on @tjscience. I will try to reach him on discord

Copy link
Contributor

@tjscience tjscience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sabitertan, thanks for working on this - it seems like a good addition. However, there is an issue. It does not seem like you have covered the scenario where the FilterMode = DataGridFilterMode.ColumnFilterRow. This mode uses the FilterHeaderCell component and there are filter icons there as well. Everything else looks good.

@SigurdEEspersen
Copy link

@sabitertan to make it easier for you, I've just checked the code. It seems that you need to pass the filter icons along in MudDataGrid.razor on line 68 to the FilterHeaderCell and then use the icons in FilterHeaderCell on line 55 and 64.
Maybe there's something I've missed, but yeah, just wanted to help :)

@ScarletKuro
Copy link
Member

@sabitertan can you do the requested changes and fix conflicts? Then I can merge this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants