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

Improve form examples, add errors to FieldErrors, fix TextField #76

Merged
merged 5 commits into from
Sep 24, 2018

Conversation

dferber90
Copy link
Contributor

Storybook

  • docs: add form fields example

Features

  • feat(field-errors): add 'fractions' and 'negative' errors

Fixes

  • fix(text-field): safely check for errors

Copy link
Contributor

@tdeekens tdeekens left a comment

Choose a reason for hiding this comment

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

No objections. Looks sharp.

isTouched={this.props.formik.touched.inventory}
errors={this.props.formik.errors.inventory}
renderError={key => {
switch (key) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Starting to like render callbacks here. At first I was sceptical and wanted s component but they‘re easier on the consumer.

// to accidental loss of data. By keeping the version in the form values
// instead an update of the version in the Apollo Cache does not affect the.
// form. On submission the version from the form values will be used, and the
// user will see the APIs ConcurrentModificationError as expected!
Copy link
Contributor

Choose a reason for hiding this comment

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

💯😘

@dferber90 dferber90 changed the base branch from df-number-field to master September 24, 2018 10:23
@dferber90 dferber90 force-pushed the df-improve-form-examples branch from a5ea9f7 to 3ec1735 Compare September 24, 2018 10:30
@dferber90 dferber90 merged commit 25b8e20 into master Sep 24, 2018
@dferber90 dferber90 deleted the df-improve-form-examples branch September 24, 2018 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants