Skip to content
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

Fix custom routes not working when based on resources #4251

Merged
merged 2 commits into from
Jan 9, 2020

Conversation

djhi
Copy link
Collaborator

@djhi djhi commented Jan 6, 2020

Ensure resource data in redux store is initialized bebfore using it.

Fixes #4196

@djhi djhi added this to the 3.1.2 milestone Jan 6, 2020
@djhi djhi added the RFR Ready For Review label Jan 6, 2020
Copy link
Member

@fzaninotto fzaninotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm concerned that the useQueryWithStore computes the loaded state by making a difference between undefined and {}. So this change may hide the datagrid skeleton when loading the list the first time. Can you check?

packages/ra-core/src/controller/useListController.ts Outdated Show resolved Hide resolved
packages/ra-core/src/controller/useListParams.ts Outdated Show resolved Hide resolved
packages/ra-core/src/controller/useRecordSelection.ts Outdated Show resolved Hide resolved
@djhi
Copy link
Collaborator Author

djhi commented Jan 7, 2020

I'm concerned that the useQueryWithStore computes the loaded state by making a difference between undefined and {}. So this change may hide the datagrid skeleton when loading the list the first time

Yes but it does this comparison internally. It has nothing to do with the defaults we specify in the other hooks. Just checked it locally and it works fine

@fzaninotto fzaninotto merged commit 1ff41ba into master Jan 9, 2020
@fzaninotto fzaninotto deleted the fix-resource-store-usage branch January 9, 2020 17:24
@fzaninotto fzaninotto changed the title Ensure resource data in redux store is initialized bebfore using it. Fix custom routes not working when rendering something of the resources Jan 9, 2020
@fzaninotto fzaninotto changed the title Fix custom routes not working when rendering something of the resources Fix custom routes not working when based on resources Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom routes not working when rendering something of the resources (3.1.0)
2 participants