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

feat(v2): Implement CheckBoxField component #3013

Merged
merged 7 commits into from
Nov 15, 2021

Conversation

karrui
Copy link
Contributor

@karrui karrui commented Nov 1, 2021

Contains a cherry picked commit from #3012 c20662d

Problem

This PR implements a field renderer for the Checkbox field.

Closes #2608

Solution

Features:

  • Add CheckboxField component and stories

Improvements:

  • feat(FieldContainer): add optional errorKey prop
    • This allows for the FieldContainer component to be less opinionated in retrieving the error messages from react-hook-form's error object, by allowing the display of error message using a specified key path.

Before & After Screenshots

Stories added for CheckboxField component

Tests

Unit tests added

@karrui karrui requested review from theMogget and tshuli November 1, 2021 02:26
…nent

# Conflicts:
#	frontend/src/utils/fieldValidation.ts
adding a label also with "others" text confused the test renderer
…nent

# Conflicts:
#	frontend/src/utils/fieldValidation.ts
@karrui karrui merged commit 7d1e9b9 into form-v2/develop Nov 15, 2021
@karrui karrui deleted the form-v2/feat/checkbox-field-component branch November 15, 2021 04:23
@justynoh justynoh mentioned this pull request Oct 5, 2022
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