-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
List component does not update when filter property is updated #2923
Comments
Our reason for wanting this is that we are using the |
Thanks for the detailed report. This is indeed the same issue as in the StackOverflow question. Would you mind openning a PR? |
Hi @djhi I'd love to... unfortunately, I'm having issues getting the test suite to pass even after I cloned down the repo directly. :( I took the following steps:
All of my Did I miss a step here? |
Ah you need to build |
@djhi I ran I've opened a PR. Some of my end-to-end tests are (locally) timing out, but they shouldn't be impacted by the changes. |
for "system imposed" filter, use the |
@fzaninotto I created a codesandbox fork using the |
sorry, it's called |
Using React Admin v. 2.92, I tried dynamically changing the The first time filter prop is set, it does not reach data provider. Then when you turn them off, data provider receives correct filter from previous step, even it "undefined" passed as filter prop. So the sequence is like this: The behaviour can be seen using this wrapper of List component:
Very possibly I'm missing something simple... |
Any updates on this issue? I'm experiencing the same behavior as @Gonusi: the filter always lags one step behind. I am integrating with a calendar component and I want the filter to adjust to the period that is visible in the calendar. What I'm observing though is that the data that is loaded is the data of the previous period. |
Same issue here trying to filter data according to the selected locale. Any plan to fix the issue? |
Since there has been some recent comments here. I opened a PR a while back (#2926) but it's since fallen behind. |
Sorry about this. It has been fixed by #3308 and I forgot to keep you updated. |
What you were expecting:
When dynamically updating the List
filter
property using a redux action the list data should immediately be updated.What happened instead:
The list data is delayed in updating creating a confusing UX.
Steps to reproduce:
If query string params are not present an error is thrown to the browser console
Warning: Missing translation for key: "Cannot read property 'toLowerCase' of null"
.Other information:
I think this is related to the
shouldUpdateComponent
function in the ListController it seems like perhaps just adding the filter property to this list could fix the issue. However, I wasn't sure if it was intentionally excluded for performance reasons...I think this stack overflow issue has the same root cause.
Environment
I have replicated this with two environments:
The text was updated successfully, but these errors were encountered: