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

setting value option on <option> tags #178

Closed
JavaGT opened this issue Dec 11, 2016 · 3 comments
Closed

setting value option on <option> tags #178

JavaGT opened this issue Dec 11, 2016 · 3 comments
Labels

Comments

@JavaGT
Copy link

JavaGT commented Dec 11, 2016

It appears that you can not dynamically generation tags with dynamically defined values.
Have created a REPL here: https://svelte.technology/repl/?gist=31068d1476982e9e6deac89e097bb018

@Rich-Harris
Copy link
Member

Huh, another fascinating quirk of the DOM: if you do input.setAttribute('list', 'suggestions'), it works, but not if you do input.list = 'suggestions'. If you do the latter, the list property has to be the <datalist> element itself, not the ID.

@JavaGT
Copy link
Author

JavaGT commented Dec 11, 2016 via email

Rich-Harris added a commit that referenced this issue Dec 12, 2016
use setAttribute() for list attributes
@Rich-Harris
Copy link
Member

Released 1.2.3 with the fix

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

No branches or pull requests

2 participants