Closed jaynel closed 6 years ago
Thanks for the PR! We’re probably going to deprecate DOM.select and related methods (see #31) in the near future in favor of HTML tagged template literals, so I don’t think it makes sense to add new functionality at this time.
For a static dropdown, I’d say:
html`<select> <option value="red">red</option> <option value="green" selected>green</option> <option value="blue">blue</option> </select>`
For a data-driven one, something like:
colors = ["red", "green", "blue"]
html`<select>${colors.map(c => ` <option value="${c}" ${c === "green" ? " selected" : ""}>${c}</option>`)} </select>`
Thanks for the PR! We’re probably going to deprecate DOM.select and related methods (see #31) in the near future in favor of HTML tagged template literals, so I don’t think it makes sense to add new functionality at this time.
For a static dropdown, I’d say:
For a data-driven one, something like: