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(list): add additional list filters for dataElementGroup/Sets #452

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Birkbjo
Copy link
Member

@Birkbjo Birkbjo commented Nov 28, 2024

Based on #438 , and we should merge that before this.

Copy link

netlify bot commented Nov 28, 2024

Deploy Preview for dhis2-maintenance-app-beta ready!

Name Link
🔨 Latest commit 9c699d5
🔍 Latest deploy log https://app.netlify.com/sites/dhis2-maintenance-app-beta/deploys/6748a0c6d3d6750008934cee
😎 Deploy Preview https://deploy-preview-452--dhis2-maintenance-app-beta.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

</div>
)
}
export const Component = DefaultSectionList
Copy link
Member Author

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.

@Birkbjo Birkbjo marked this pull request as ready for review November 29, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant