-
Notifications
You must be signed in to change notification settings - Fork 25
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: allow SmartInput and Field to receive autoComplete
prop
#53
Comments
@janhesters, thank you also for offering to create a PR for this one. I will share what I'd do if I were to implement it at a high level, but please bring as many follow-on questions as you need: First, I'd create three examples on our test-examples folder. The first one would include a few The second would include similar The third would do the same with Then I'd write failing E2E tests, allowing me to TDD my way to implementation. Only then I'd start implementation. For the For the Then I'd destructure it here and pass it to the appropriate inputs inside this chain of ternaries. I probably missed something, and I hope I didn't take away the fun by giving you the (probably) precise places to change. But I know this code is complex, and I thought this would be an incentive for a good first PR :D Let me know if you have any doubts! |
Wow thanks a ton! I'm going to finish a PR over the coming days. Just worked on it for an hour, but its much to learn in this codebase haha.
No, you honestly enable me be able to write the PR in the first place! Thanks again, will post here when the PR is ready again, or if I have more questions 🙏 |
Feature request
Current Behavior
Right now, there is no way to give a
Field
or aSmartInput
anautoComplete
prop, e.g.autoComplete="username"
.Let's say you have a custom
Input
configured and a Zodschema
like this:And you want to have an input with an
autoComplete
property, you have to render it like this:This renders using
SmartInput
as well as configuringinputComponent
on theForm
useless in these cases.Desired Behavior
Ideally, we could give the
Field
or theSmartInput
theautoComplete
property, so we could render:(Note that in this case, we could also render
firstName
straight up as aField
, but I wanted to show the "Custom Field, standard components" version, too.)We also have to consider this for the
Form
'srenderField
prop, e.g.:Alternatives
Alternatively, maybe there is a way to infer the
autoComplete
prop from theschema
for certain all the keys that are possibleautoComplete
values.The text was updated successfully, but these errors were encountered: