question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Two lists for the same resource share the same store for their state

See original GitHub issue

What you were expecting:

I have 2 lists for the same resource. One list is accessible from the main menu and shows all datasets with a rows per page set to 25. The second list for the same resource is part of a tabform in an edit dialog of another resource and shows related datasets. Here we have rows per page of 10 and different search fields than in the first list.

Both lists should should be completely separated and the state of search fields, order and rows per page in the store should be stored for both instances separately.

What happened instead:

When I search for data in the second list or change the sort order there, an entry is written in the store with the state of search fields, order and pagination. After that I open the first list from the main menu. Here we see now 10 rows per page instead of 25 and data is filtered by criteria that we entered in the second list. Unfortunately we cannot change the filter because we have different search fields.

The state is stored with the key RaStore.resource_name.listParams and is used for both lists, even they are configured differently.

Environment

  • React-admin version: 4.2.5

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
slax57commented, Sep 13, 2022

@crates PR https://github.com/marmelab/react-admin/pull/8073 should have you covered. It should be merged pretty soon.

Also note that if you do not want the list to save and read its state from the store, you have to use the disableSyncWithLocation prop.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-admin separated filters on two lists sharing the same ...
My goal: Separate those two sets of filters OR Do not store filters states in Redux OR Reset filters on opening the modal...
Read more >
Sharing your AWS resources - AWS Documentation
When you share a resource with principals in other AWS accounts, they must access each resource from the same AWS Region that it...
Read more >
America's Founding Documents - National Archives |
Through Founders Online, you can read and search through thousands of documents and records to and from George Washington, Benjamin Franklin, ...
Read more >
Create list relationships by using lookup columns
To make a list relationship, you will need two lists: the source list and the target list. You should make the source list...
Read more >
Frequently Asked Questions | U.S. Department of the Treasury
"Indirectly," as used in OFAC's 50 Percent Rule, refers to one or more blocked persons' ownership of shares of an entity through another...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found