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

Add the option of a default filter operator and fix filters #849

Conversation

cococov
Copy link
Contributor

@cococov cococov commented May 20, 2024

Related Issue

Fix: #847 #843

Description

Feature: Previously, I contributed a feature that allowed operators in the table filters. Now, I am adding the option to have a default operator for each column, enabling things like saving the operator in the URL query parameters

image

Fix: While developing this feature, I noticed a bug with the filters that prevented me from testing my feature. I also saw that there were issues related to it. So, I fixed it. (I recommend taking a look at the commit that introduced the problem, because it's a large refactor and, just as this was missed, something else might have been overlooked.)

Impacted Areas in Application

  • Column filters

Additional Notes

I included the fix in this PR so it can be tested easily without waiting for another PR to be merged.

@Domino987
Copy link
Contributor

Hi thanks for this.
While checking it, I did not see the default value back to = for the operator. So what happens if no filter is provided? Would it still work?

@cococov cococov force-pushed the feature/default-filter-operator-for-url-params branch from dcfb24f to 6101c3d Compare May 21, 2024 00:20
@cococov
Copy link
Contributor Author

cococov commented May 21, 2024

Hi thanks for this. While checking it, I did not see the default value back to = for the operator. So what happens if no filter is provided? Would it still work?

It's not really a problem, because if it's not added, the default behavior is '='. I added it anyway to prevent it from being undefined. The change is already up! (src/utils/data-manager.js:140)

@Domino987
Copy link
Contributor

Ok I'll merge after the console log is removed 😉

@cococov cococov force-pushed the feature/default-filter-operator-for-url-params branch from 6101c3d to 6ad4d5c Compare May 21, 2024 15:49
@cococov
Copy link
Contributor Author

cococov commented May 21, 2024

Ok I'll merge after the console log is removed 😉

Oh! My bad 😅. Done! the change is up

@Domino987 Domino987 merged commit 6efc818 into material-table-core:master May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

column filtering is nolonger working in version "@material-table/core": "^6.4.3",
2 participants