-
Notifications
You must be signed in to change notification settings - Fork 2
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(list): add additional list filters for dataElementGroup/Sets #452
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for dhis2-maintenance-app-beta ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
</div> | ||
) | ||
} | ||
export const Component = DefaultSectionList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to reuse the default list component here. This was because useDataQuery
would cause issues, and get the wrong data in the list. This happens because the query
is dynamic, so the querykey resolves to { result: { resource: 'dataElements' } }
, which causes react-query
to resolve the data to the same that is in the dataElement
-filter, and not the data you want for the list. Essentially leaking data from another source.
Dynamic queries ( params: (params => params)) is very dangerous for this reason, we should not use them.
Based on #438 , and we should merge that before this.