-
Notifications
You must be signed in to change notification settings - Fork 544
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
fix(Form): return state on validate #472
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Live Preview ready!
|
@@ -29,11 +29,11 @@ async function submit () { | |||
:state="state" | |||
@submit.prevent="submit" | |||
> | |||
<UFormGroup label="Email" name="email-joi"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, I see the issue. I've updated this because it throws some duplicate ids warnings in the console.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok! Let's update the schema path then!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked into it, is it necessary to bind the name props to id on inputs?
https://github.com/nuxtlabs/ui/blob/dev/src/runtime/components/forms/Input.vue#L4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, it was just a shortcut to write less code. But removing it would cause a breaking change though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, the id
is here to be targeted by the FormGroup component through <label for="..." />
, we can't remove it..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What can we do to fix this quickly? I plan to release the 2.7.0
today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the name attributes in the examples, should be good enough for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, the id is here to be targeted by the FormGroup component through , we can't remove it..
Could you send me a link to the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benjamincanac Spotted a few issues in the last examples in the docs.