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): add NumberField component for use when rendering forms #2684

Merged
merged 12 commits into from
Sep 7, 2021

Conversation

karrui
Copy link
Contributor

@karrui karrui commented Aug 26, 2021

Problem

This PR implements component that takes in a number field schema and creates a field with validation according to the schema.

Also has a fix in the base NumberInput component, passing the ref into the input so it can be focused by rhf on error.

Closes #2609

Fixes

  • update NumberInput ref to be passed into input instead of box

Tests

Add unit tests using Storybook's stories

Deploy Notes

New dependencies:

  • simplur: easy pluralisation of strings

@karrui karrui requested review from mantariksh and timotheeg August 26, 2021 09:12
@karrui
Copy link
Contributor Author

karrui commented Sep 1, 2021

Rerequesting review since there are some changes to number field

@karrui karrui requested a review from mantariksh September 1, 2021 05:55
frontend/src/utils/fieldValidation.ts Outdated Show resolved Hide resolved
# Conflicts:
#	frontend/src/utils/fieldValidation.ts
@karrui karrui merged commit 6cc852c into form-v2/develop Sep 7, 2021
@karrui karrui deleted the form-v2/number-field-component branch September 7, 2021 08:10
@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.

3 participants