aspnetcore: Why does SelectList no longer support a constructor which takes a list of disabled items?
In Asp.Net MVC the SelectList has a constructor overload of the form:
public SelectList(
IEnumerable items,
object selectedValue,
IEnumerable disabledValues)
However, in Asp.Net Core MVC, there is no longer a constructor which takes disabled items as a parameter:
public SelectList(
IEnumerable items,
string dataValueField,
string dataTextField,
object selectedValue,
string dataGroupField)
Was this a conscious decision or would you accept a pull request to support this use case?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (9 by maintainers)
@RyanTaite the
SelectListGroups are compared work reference equality, not byNamebecause multiple groups may have the same name. If you want less-granular grouping, create theSelectListGroups first e.g.Being new here, what is the recommended way to “show interest” for this enhancement request? +1? Posting in this thread?