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

Adds all input type Field form helpers #511

Merged
merged 8 commits into from
May 19, 2020
Merged

Adds all input type Field form helpers #511

merged 8 commits into from
May 19, 2020

Conversation

cannikin
Copy link
Member

@cannikin cannikin commented May 4, 2020

This covers the ones we already had (Hidden, Text, Checkbox, Radio) and adds all the others found here: https://www.w3schools.com/html/html_form_input_types.asp

It uses a bit of metaprogramming—it uses the input types in a loop to create the component definitions on the fly and then assigns them to an object. The only downside is that you can't dynamically export all the objects, you need to name each and every one manually. :(

@cannikin cannikin marked this pull request as ready for review May 4, 2020 23:49
@thedavidprice
Copy link
Contributor

Wait... did you break the CI??

@cannikin
Copy link
Member Author

cannikin commented May 5, 2020

Yeah what happened to the logs? It doesn’t show anything happening. :( I got an email like 30 minutes after my first commit that ESLint didn’t like something, but since then I can’t see anything in the Checks tab...

@cannikin
Copy link
Member Author

cannikin commented May 8, 2020

@peterp did you get a chance to look at adding that Babel plugin you mentioned? Thanks dude!

@peterp peterp force-pushed the master branch 6 times, most recently from 711c520 to 2341368 Compare May 10, 2020 10:07
@cannikin
Copy link
Member Author

After mush gnashing of teeth we found we can't do the easy export statement the way we hoped. We have to list the name of every function manually. Ugh.

@cannikin cannikin merged commit 5447b76 into master May 19, 2020
@cannikin cannikin deleted the rc-input-types branch May 19, 2020 21:44
@thedavidprice thedavidprice added this to the next release milestone May 19, 2020
jmreidy pushed a commit to jmreidy/redwood that referenced this pull request May 30, 2020
* Adds all input typesCloses redwoodjs#510

* Adds comments and docs

* More docs

* Simplify function creation

* Disable eslint on useFormContext call

* Fixes exports

Co-authored-by: Rob Cameron <rob.cameron@fastmail.com>
Co-authored-by: Peter Pistorius <peter.pistorius@gmail.com>
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