This repository was archived by the owner on Nov 6, 2020. It is now read-only.
feat(conditional): conditional as a regular component#16
Merged
HendrikThePendric merged 2 commits intomasterfrom Aug 14, 2019
Merged
feat(conditional): conditional as a regular component#16HendrikThePendric merged 2 commits intomasterfrom
HendrikThePendric merged 2 commits intomasterfrom
Conversation
Mohammer5
suggested changes
Aug 14, 2019
Contributor
Mohammer5
left a comment
There was a problem hiding this comment.
How about clearOnHide?
Mohammer5
approved these changes
Aug 14, 2019
Contributor
Author
That's shorter for sure. However, I find that it sounds like a function, or perhaps a boolean. Sticking with the current name for now... |
dhis2-bot
added a commit
that referenced
this pull request
Feb 13, 2020
# 1.0.0 (2020-02-13) ### Bug Fixes * **deps:** move @dhis2/props-types back to dependencies ([#156](#156)) ([9354cbc](9354cbc)) * **deps:** set dependencies provided by app-platform to peerDeps ([#152](#152)) ([db38005](db38005)) * force the optimize for speed flag for styled-jsx based on env ([5626711](5626711)) * force the optimize for speed flag for styled-jsx to true ([71183c1](71183c1)) * **conditional:** use render instead of onChange to have access to form ([615488d](615488d)) * **file:** show name of selected file ([d622b34](d622b34)) ### Features * add composeValidators & required and email validator functions ([9d6ec6a](9d6ec6a)) * add confitional HOC ([e677b7b](e677b7b)) * add File component ([308335f](308335f)) * add Form component & mutators ([2b0ba72](2b0ba72)) * add Radio and RadioGroup & update stories ([b93ce20](b93ce20)) * add required validator ([a7a5c37](a7a5c37)) * apply conditional HOC to File ([8559f28](8559f28)) * introduce counterparts for ui-core form components ([#108](#108)) ([9dbeb29](9dbeb29)), closes [#133](#133) [#134](#134) [#136](#136) [#146](#146) * synchronous validators ([#164](#164)) ([75cd2ea](75cd2ea)) * **conditional:** conditional as a regular component ([#16](#16)) ([8f6eae7](8f6eae7))
Contributor
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
I created the
Conditionalcomponent as we discussed it on Slack. What is up for debate is the name of the prop that is currently calledfieldsToClearOnHide. It is a bit long and camelCasy, but I couldn't think of a better alternative. Also, I decided not to conditionally render the formSpy. Instead I am using the formState directly now to clear the field values, and just rendering null in the end.