-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix(core): reset table filters and sorters on current page re-navigate via side-nav #6389
base: master
Are you sure you want to change the base?
Conversation
- reset filters and sorters used in tables on URL query clear
🦋 Changeset detectedLatest commit: d72941e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @arndom thanks for the PR, please make sure to add tests for the behavior.
Co-authored-by: Batuhan Wilhelm <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @arndom thank you for your effort! 🙏 I've left a comment in the issue (#6300 (comment)) about the implementation we're looking for.
While your changes will work for the reported case, it won't cover other cases such as changing the query params without using the useTable
hook.
Let us know if you can work on the changes described in the comment 🙏
@aliemir Sure, it's best to finish what I started properly...though I may need some guidance as I'm still fresh on the codebase |
Hey @arndom are you gonna be able to continue on this PR? Please let us know if you need help with a specific issue. We'd be happy to guide you through. |
@BatuhanW I still plan to, I just haven't had the time recently due to my work schedule. Some help on the approach to solving this would be great. My current thought process: Since |
useTable
hook to handle case where a user navigates to current page by clicking side-nav link intending to reset the filters and sorters.PR Checklist
Please check if your PR fulfills the following requirements:
Bugs / Features
What is the current behavior?
In a table, apply some filters/sorters then click the menu item in the sidebar, the URL should reset filters and sorters to the default but it doesn't.
This can be previewed at https://example.admin.refine.dev/orders
What is the new behavior?
The above has been resolved. It resets the query params for filters and sorters back to their defaults.
fixes #6300
Notes for reviewers