Support asp-items for datalist element
Open
affected-medium
area-mvc
enhancement
feature-mvc-razor-views
help wanted
Priority:2
severity-minor
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
The [`` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist) can be used to create a HTML-only "type-to-select" drop-down list (aka combobox with input enabled).
The elements with the `` tag are of type ``, just like those that would be in a `` list, which is supported by the `asp-items` Razor tag helper.
e.g. it would be great to be able to turn
```html
```
into
```html
```
But perhaps it would be necessary for the tags to be coalesced into one, so that one need not type out and match the `id` tag, in which case it might look something like this:
```html
```
Contributor guide
Assessment
This issue has not been assessed yet.