refine icon indicating copy to clipboard operation
refine copied to clipboard

fix(core): sync url params with internal state for `useTable` hook

Open arndom opened this issue 10 months ago • 3 comments

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://refine.dev/docs/guides-concepts/contributing/#commit-convention

Bugs / Features

  • [x] Related issue(s) linked
  • [ ] Tests for the changes have been added
  • [ ] Docs have been added / updated
  • [x] Changesets have been added https://refine.dev/docs/guides-concepts/contributing/#creating-a-changeset

What is the current behavior?

In the useTable hook, when there are internal state changes it can update URL state, but it doesn't work in the reverse. This leads to some edge cases where a change in the url doesn't affect the table.

What is the new behavior?

There is now watcher useEffect that checks if the URL and internal are in sync before making the necessary updates.

fixes (issue) #6300

Notes for reviewers

  • There is currently a bug I need assistance with to get the feature completed, as detailed here

  • This would be a continuation of #6389 as I couldn't re-open it.

arndom avatar Jan 14 '25 07:01 arndom

🦋 Changeset detected

Latest commit: dd79d6bf0bf7f092b159e4dc3d6cd2802b05a46b

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

This PR includes changesets to release 1 package
Name Type
@refinedev/core 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

changeset-bot[bot] avatar Jan 14 '25 07:01 changeset-bot[bot]

Deploy Preview for refine-doc-live-previews ready!

Built without sensitive environment variables

Name Link
Latest commit dd79d6bf0bf7f092b159e4dc3d6cd2802b05a46b
Latest deploy log https://app.netlify.com/sites/refine-doc-live-previews/deploys/67b2fdc02345070008860c08
Deploy Preview https://deploy-preview-6645--refine-doc-live-previews.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.

netlify[bot] avatar Jan 14 '25 07:01 netlify[bot]

Any update on this?

fer-ri avatar Mar 16 '25 16:03 fer-ri