Skip to content

Conversation

@djhi
Copy link
Collaborator

@djhi djhi commented Nov 5, 2025

Problem

When users are redirected to a list page for which they previously applied some parameters (page, perPage, filters, etc.), they don't see those parameters reflected in the URL even though they are indeed applied on the list. This happens for instance when redirected from an edition page. This makes the URL non shareable anymore and can be surprising.

Fixes #11018

Solution

When the list loads, if there are stored parameters and those are not reflected in the URL, update the URL except if:

  • the URL contains any parameters
  • disableSyncLocation is true
  • the parameters are the default ones (we want to keep clean and simple URLs such as /posts)

How To Test

  1. make run
  2. Apply some parameters on the list (filters, sort, perPage and/or page)
  3. Edit a post and save
  4. Check the URL is updated according to the previously set parameters

Performances

  • on the next branch, repeat the steps above but enable the react profiler (devtool) before clicking Save at step 3. Note the number of renders of the List component
  • do the same on this PR branch and compare with the previous number of renders

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

@djhi djhi added RFR Ready For Review WIP Work In Progress and removed RFR Ready For Review labels Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RFR Ready For Review

Development

Successfully merging this pull request may close these issues.

2 participants