What you were expecting:
Expecting the Export button to get re-rendered when the total is changed
What happened instead:
The Export button was not changed
Steps to reproduce:
visit a resource's list page directly using the link (or by refreshing it)
Related code:
At this line of code the total property is not included in the onlyUpdateForKeys list which causes the export button not to be refreshed when the {data, total} pair is updated.
Meanwhile at this line of code the export button is total dependent.
Also, I've checked the 3.x version, there the total is included as written at this line of code
Possible Solution
Just add total to the list of onlyUpdateForKeys.
Other information:
None
Environment
Thanks for the issue.
@djhi @jdemangeon
Is anyone working on it?
If not then, I can.
With pleasure @manishsundriyal ;)
@djhi @jdemangeon @fzaninotto
If you have some time, then please review https://github.com/marmelab/react-admin/pull/4694
I have raised the PR only against the 2.x branch. As this bug is not in the master.
Let me know if it requires any further updates.
@djhi @fzaninotto
Shouldn't this be closed now?
Fixed by #4694