Make SelectTagHelper more extensible
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
Is it possible to extend the SelectTagHelper to allow more customisation of the generated options? The idea being that I want to provide a little more metadata about options which in turn changes the dynamics of the UI.
public class ExtendedSelectListItem : SelectListItem
{
public HtmlAttribute[] Attributes { get; set; }
}
// if something exists
public class HtmlAttribute
{
public string Name { get; set; }
public string Value { get; set; }
}
I essentially want something like:
None
Contains
DoesNotContain
Between
NotBetween
I've looked at the internals of ExtendedSelectTagHelper but that then uses an instance of IHtmlGenerator (DefaultHtmlGenerator) which goes down to the depths of GenerateSelect and internals of GenerateOption.
Contributor guide
Assessment
This issue has not been assessed yet.