Skip to content

Non-unique IDs when using multiple ReactCodeInputs #26

@jacobpenny

Description

@jacobpenny

If you have more than one ReactCodeInput on a page the input elements will wind up with duplicate IDs. If type is password then Chrome (Version 66.0.3359.181 here) will actually complain with something like [DOM] Found 2 elements with non-unique id #0: (More info: https://goo.gl/9p2vKq) .

Does it make sense to add an idPrefix prop or similar to avoid this? I'd be glad to submit a PR if that sounds like a decent solution.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions