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

fix(antd): handle date range filter conversion issue in audit log when page refreshed #5961

Closed
wants to merge 1 commit into from

Conversation

rohitlohar45
Copy link

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

The current behavior is that the date range table filter in Ant Design is broken, causing errors upon page reload and subsequent crashes. This is due to incorrect formatting of date filters for GraphQL compatibility.

What is the new behavior?

The new behavior fixes the issue by ensuring that date filters are correctly formatted for GraphQL compatibility, resolving the error upon page reload and preventing subsequent crashes.

Notes for reviewers

Please review the changes made to ensure that the date filters are now formatted correctly and that the issue described is resolved.

fixes #5933

@rohitlohar45 rohitlohar45 requested a review from a team as a code owner May 18, 2024 12:23
Copy link

changeset-bot bot commented May 18, 2024

🦋 Changeset detected

Latest commit: 2657b9c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@refinedev/antd Major
@refinedev/inferencer Major
@refinedev/live-previews Patch

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

Copy link

netlify bot commented May 18, 2024

Deploy Preview for refine-video-club ready!

Name Link
🔨 Latest commit 2657b9c
🔍 Latest deploy log https://app.netlify.com/sites/refine-video-club/deploys/66489dad1da23b00082fde4a
😎 Deploy Preview https://deploy-preview-5961--refine-video-club.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@alicanerdurmaz
Copy link
Member

alicanerdurmaz commented May 21, 2024

@rohitlohar45 Thanks for the detailed explanation.

It can solve this problem, but we must solve it in other UI Packages. It is not sustainable to solve it separately in all UI packages. Therefore, we need to solve this problem in useTable core and actually snycWithLocation operation is already done in the core.

I think it is very likely that the problem is in the @refinedev/react-router-v6 package. there is a problem when converting dayjs object to URL

I was wrong that's why I strikethrough the text.

I pair with @aliemir and we found there is a bug on <FilterDropdown />. Refine's data-provider expects string but ant design works with dayjs. So, we decided the responsibility for handling this situation lies with <FilterDropdown />. Somehow we should send dayjs to Ant Design, but we should keep it as a string in Refine's state. We have a couple of ideas to handle this, I will keep you informed

@rohitlohar45
Copy link
Author

@alicanerdurmaz any ideas I can know that I can work on, like even if some information can help me navigate better

@alicanerdurmaz
Copy link
Member

@rohitlohar1 We have resolved this issue and would appreciate your review #5980.

Thank you for contributing to Refine. Unfortunately, I will close your PR because, in this instance, it was more straightforward to write and demonstrate the code than to explain the solution, as the problem was deeply embedded in Refine.

I hope the solution works well 🚀. Please feel free to reach out if you have any questions 🙌.

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.

Date range table filter in Ant Design is broken
3 participants