-
Notifications
You must be signed in to change notification settings - Fork 3
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(cat-combo-table): prevent filter from unmounting data-elements #186
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🚀 Deployed on https://pr-186--dhis2-data-entry.netlify.app |
Birkbjo
force-pushed
the
fix/TECH-1217/keep-field-state-filter
branch
from
September 19, 2022 22:43
96e1956
to
8645166
Compare
Birkbjo
force-pushed
the
fix/TECH-1217/keep-field-state-filter
branch
from
September 19, 2022 22:44
8645166
to
e060b9e
Compare
Mohammer5
approved these changes
Sep 22, 2022
dhis2-bot
added a commit
that referenced
this pull request
Sep 22, 2022
# [100.0.0](v99.0.0...v100.0.0) (2022-09-22) ### Bug Fixes * **cat-combo-table:** prevent filter from unmounting data-elements ([#186](#186)) ([f767dce](f767dce)) * **completion:** do not validate when offline ([454fe6d](454fe6d)) * **completion:** set loading to true when starting incompleting ([7e92323](7e92323)) * **completion mutation:** extract variables correctly after refactoring ([ced05c7](ced05c7)) * **form completion:** check for empty responses ([fd9c2c2](fd9c2c2)) * address post-rebase bugs ([a37c460](a37c460)) * **form completion:** cancel open mutations when (in-)completing ([5d66744](5d66744)) * add mutation key-factory ([7268141](7268141)) * completion onMutate and setDefault ([1a6f0ce](1a6f0ce)) * remove loading from completion ([4e4ff13](4e4ff13)) * **form completion error alert message:** correct & translate message ([2f18af2](2f18af2)) * typo ([466fe22](466fe22)) ### chore * **release:** release v100.0.0 ([f59bc94](f59bc94)) ### Features * **completion:** respect "validCompleteOnly" flag on data sets ([41ca259](41ca259)) * add completion functionality ([2540111](2540111)) * reduce org-unit-tree network traffic and support prefetching ([#187](#187)) ([4ce86ac](4ce86ac)) ### BREAKING CHANGES * **release:** move to v100 versioning scheme
🎉 This PR is included in version 100.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Birkbjo
added a commit
that referenced
this pull request
Sep 25, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes TECH-1217
Filtering out dataElements removes them from the tree, and thus clears the state of the fields. Instead this uses
display: none
to prevent the nodes from being unmounted. This also seems to improve the filtering performance, as we prevent fields from unsubscribing and resubscribing to RFF and other hooks.Not sure if this has any unintended side-effects, but I haven't seen any from my limited testing.
Edit: Might need to come back to this. It might make sense to move "syncing"-state to a react-final-form mutator. Will research more when looking at #182 .
Codesandbox with a similar use-case: https://codesandbox.io/s/7k742qpo36?file=/index.js