LouisMazel/maz-ui

[Issue][PhoneInput] Duplicate element IDs when passing a custom ID

cmstolper opened this issue · 2 comments

Describe the bug

When using the id prop of MazPhoneNumberInput to pass a custom ID to its input, duplicate element IDs appear between the intended input and a parent div.

To Reproduce

Steps to reproduce the behavior:

  1. Set an id attribute/prop on the <MazPhoneNumberInput> component
  2. Observe multiple elements get set with this id

Expected behavior

Only the intended input element should have the specified element id set.

Additional context

On version 3.31.6. This may be due to using a native attribute name of id that falls through, causing both the intended element and some parent element to get the custom ID applied. There isn't a duplication problem if the id prop isn't set.

Sorry, this appears to have been fixed between 3.31.6 and 3.42.8 at least coincidentally, though I couldn't find a related issue. Feel free to close.

Effectively, I fixed it when I completely rewrote this component.

I close the issue.

Thanks for your feedback 🙂