-
Notifications
You must be signed in to change notification settings - Fork 556
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
Add ids to inputs and buttons #1517
Conversation
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.
You can have more than one lock per page, so you have to get the current lock id. There's an example here: l.id(lock)
- https://github.com/auth0/lock/blob/master/src/field/email/email_pane.jsx#L21
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.
Now all the ids will have be the same within a lock instance 😬
You need to mix your previous approach with this one.
For example:
const lockId = l.id(model);
...
<input id={`${lockId}-${name}`} type="hidden" value={value} name={name} />
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.
Can you look the failing tests? this implementation looks nice!
in |
@tingaloo you're just missing the snapshots! Almost there 😅 To fix snapshots, run:
|
Thanks soooooo much for this PR 🎉 |
This reverts commit ebaf498.
Took a stab at #1174, added ids to inputs. I assumed that there will be one instance of some inputs, correct me if i'm wrong.