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

Cannot create select if it does not have ID #41

Open
TivoSoho opened this issue Mar 12, 2024 · 1 comment
Open

Cannot create select if it does not have ID #41

TivoSoho opened this issue Mar 12, 2024 · 1 comment

Comments

@TivoSoho
Copy link

TivoSoho commented Mar 12, 2024

We usually do not add IDs - it has no importance to us. However it fails to create a select this way. The line that fails:
customDropdown.classList.add(originalSelect.id),

I cannot even fathom how to make a PR as I do not how much you actually use it. I am not even sure why one would add an ID to a class list...

@powderflask
Copy link

This is also causing an issue for us in a tabbed layout where there is filter form on each tab. The filter forms are generated by generic code, so their select widgets don't have unique id's.
I'm not much of a JS programmer, but I wonder if it might be possible to store a reference to the select DOM element rather than relying on its id? I'd be happy to work on this, but would like to know if this is even something that the maintainers would consider or think might be a fruitful direction?

Excellent job with this component btw - so good to have such a great option with zero dependencies.

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

2 participants