-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Context
If I have multiple PUIK elements on my page, it is possible for some to share the same ID due to the generateId() function in puik-utils (there is a 1 in 1000 chance, but it still happens 😬).
Steps to Reproduce
- Create multiple
puik-checkboxelements. - Reload the page until 2 checkboxes have the same ID.
- The checkbox becomes unusable when clicking on the label.
Expected Behavior
I should be able to click on any label, and it should check the correct checkbox.
Current Behavior
When I click on a label that shares an ID with another, it checks the wrong checkbox.
Additional Comments
The generateId() function in puik-utils does not generate a unique ID.
A UUID should be generated instead of a random number between 1 and 1000 to ensure it is truly unique.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working