Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Add onInvalid to react props #322

Merged
merged 3 commits into from
Sep 6, 2017
Merged

Conversation

tvler
Copy link
Contributor

@tvler tvler commented Sep 4, 2017

What:
Adds onInvalid to list of react props to pass through.

Why:
onInvalid is a supported react event, but it isn't documented on the SyntheticEvent page (facebook/react#10554).

How:
Added onInvalid to the react-props.js array.

Checklist:

  • Documentation
  • Tests
  • Ready to be merged
  • Added myself to contributors table

@codecov-io
Copy link

codecov-io commented Sep 4, 2017

Codecov Report

Merging #322 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #322   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          10     10           
  Lines         172    172           
  Branches       47     47           
=====================================
  Hits          172    172

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3751b39...c006b1f. Read the comment docs.

@tvler
Copy link
Contributor Author

tvler commented Sep 5, 2017

Right now you can pass through onInvalid through the forwardProps option like this:

glamorous('input', { forwardProps: 'onInvalid' })

But I think it'll make more sense to include this in the default component factory:

glamorous.input

@kentcdodds
Copy link
Contributor

Hi @tvler! Thanks for the PR. Is onInvalid an officially supported react event callback?

@tvler
Copy link
Contributor Author

tvler commented Sep 6, 2017

Hey! Yep, the event was added in v15 in the PR facebook/react#5187.

It just was never added to the events documentation page.

Copy link
Contributor

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

This is perfect. Thank you !

@kentcdodds kentcdodds merged commit aa88d25 into paypal:master Sep 6, 2017
@kentcdodds
Copy link
Contributor

Thank you so much!

@tvler
Copy link
Contributor Author

tvler commented Sep 6, 2017

No problem! Awesome library btw, iFixit's really diggin it 👍

@kentcdodds
Copy link
Contributor

Awesome! Could you add iFixit to the Users.md?

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.

3 participants