Skip to content
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
conditional-as-a-component
Aug 14, 2019
Merged

feat(conditional): conditional as a regular component#16
HendrikThePendric merged 2 commits intomasterfrom
conditional-as-a-component

Conversation

@HendrikThePendric
Copy link
Copy Markdown
Contributor

I created the Conditional component as we discussed it on Slack. What is up for debate is the name of the prop that is currently called fieldsToClearOnHide. 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.

Copy link
Copy Markdown
Contributor

@Mohammer5 Mohammer5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about clearOnHide?

Comment thread src/helper/Conditional.js
@HendrikThePendric
Copy link
Copy Markdown
Contributor Author

How about clearOnHide?

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...

@HendrikThePendric HendrikThePendric merged commit 8f6eae7 into master Aug 14, 2019
@HendrikThePendric HendrikThePendric deleted the conditional-as-a-component branch August 14, 2019 10:54
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))
@dhis2-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants