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 9 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