Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

refactor(input): correct checkbox logic for use with redux-form #246

Merged
merged 1 commit into from
Feb 7, 2019

Conversation

tbuchann
Copy link
Contributor

@tbuchann tbuchann commented Feb 5, 2019

Refactor checkbox logic to be used within redux-form

Copy link

@blockfred blockfred left a comment

Choose a reason for hiding this comment

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

🎉

touched: boolean,
valid: boolean,
value: string | boolean,
visited: boolean,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not the full libdef?

src/Atoms/Inputs/Checkbox.js Show resolved Hide resolved
@mpsq
Copy link
Contributor

mpsq commented Feb 6, 2019

Also, did you try to use the lib in a project which does not use/include redux-form, does it work?

@tbuchann tbuchann force-pushed the refactor/checkbox branch 3 times, most recently from d597c09 to 40052ba Compare February 6, 2019 18:03
@coveralls
Copy link

coveralls commented Feb 6, 2019

Coverage Status

Coverage decreased (-0.3%) to 98.09% when pulling 82dce0f on refactor/checkbox into 45fffe7 on master.

@mpsq
Copy link
Contributor

mpsq commented Feb 6, 2019

Ha! Just realised that this libdef if very old (redux-form v5) and that it is deprecated. It is recommended to use the types directly from redux-form because that lib is typed with flow.
That means we need to add redux-form as a dev dep, and import type(s) def from there.

We need to test that, bundle the lib and make sure that redux-form is not included.

package.json Outdated Show resolved Hide resolved
src/Atoms/Inputs/Input.js Outdated Show resolved Hide resolved
Copy link
Contributor

@mpsq mpsq left a comment

Choose a reason for hiding this comment

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

LGTM. I also checked the bundled code and redux-form is not included 🎉.

@mpsq mpsq merged commit 566e20d into master Feb 7, 2019
@mpsq mpsq deleted the refactor/checkbox branch February 7, 2019 15:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants