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

Found elements with non-unique id # #4125

Open
laxman-ghavte opened this issue Jul 16, 2021 · 1 comment
Open

Found elements with non-unique id # #4125

laxman-ghavte opened this issue Jul 16, 2021 · 1 comment

Comments

@laxman-ghavte
Copy link

If crousel has form input elements like textbox and submit button then with infinite true option getting console errro "[DOM] found X elements with non-unique id #"

@laxman-ghavte
Copy link
Author

laxman-ghavte commented Jul 16, 2021

Solution
Insted if no Id, we can set some randome id.
.attr('id', '') can be replaced with
.attr('id', Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5))

PR: #4126

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

No branches or pull requests

1 participant