Skip to content
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

Feature request: default popupId to useId #128

Closed
eugene-mohc opened this issue Nov 20, 2023 · 3 comments · Fixed by #137
Closed

Feature request: default popupId to useId #128

eugene-mohc opened this issue Nov 20, 2023 · 3 comments · Fixed by #137
Labels

Comments

@eugene-mohc
Copy link

eugene-mohc commented Nov 20, 2023

I would like to suggest a feature to default the popupId property to the useId hook when it has been omitted. The purpose of the useId hook is exactly for cases such as these, and it would cut down some boilerplate of always having to manually specify popupId: useId() every time.

@tusbar
Copy link

tusbar commented Dec 11, 2023

I’m not sure there’s even a reason why you’d ever want to pass a non-generated id.

@jedwards1211
Copy link
Member

Makes sense, I'll see if I can implement this soon, would also be open to a PR.

I've generally used explicit IDs so that I can select the popup component in Selenium tests, though attaching data- attributes for test selectors would work too

@jedwards1211
Copy link
Member

🎉 This issue has been resolved in version 5.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants