We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What you were expecting: The Query component should send a request on update only when the props have changed.
What happened instead: Sends request on every update
Steps to reproduce: Create a deep payload object for the Query component.
Related code:
const payload = { id: record.id, target: 'author', sort: { order: 'DESC', field: 'createdAt' }, pagination: { page: 1, perPage: 1 } } return ( <Query type='GET_MANY_REFERENCE' resource={constants.resources.posts} payload={payload} > {({ data, loading, error }) => { return <></> </Query> )
Other information: A solution could be to change shallowEqual in the Query's componentDidUpdate to deepEqual.
Environment
The text was updated successfully, but these errors were encountered:
Related to #3146
The Query component use a shallowEqual, is it on purpose @fzaninotto ?
Query
shallowEqual
react-admin/packages/ra-core/src/util/Query.tsx
Lines 110 to 111 in e0bdf6d
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
What you were expecting:
The Query component should send a request on update only when the props have changed.
What happened instead:
Sends request on every update
Steps to reproduce:
Create a deep payload object for the Query component.
Related code:
Other information:
A solution could be to change shallowEqual in the Query's componentDidUpdate to deepEqual.
Environment
The text was updated successfully, but these errors were encountered: