-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
6a61a8f
to
4208c8f
Compare
[ContentBehavior(ContentBehavior.Replace)] | ||
public class InputTagHelper : TagHelper | ||
{ | ||
private readonly Dictionary<string, string> _defaultInputTypes = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason this can't be static?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see, this then ties into my q about extensibility below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure. I also convinced myself any public
configuration points (this isn't ideally a protected
extensibility point) should be done when / if we plumb MvcOptions
into HtmlHelper
and our various ITagHelper
implementations e.g. ViewContext.ClientValidationEnabled
, ViewContext.Html5DateRenderingMode
, DefaultHtmlGenerator.IdAttributeDotReplacement
, TemplateRenderer._defaultDisplayActions
, TemplateRenderer._defaultEditorActions
, and this should get defaults or additions from MvcOptions
.
🐃 |
1cf6935
to
3a04e99
Compare
ad096f7
to
febd5c4
Compare
|
/// attribute to that formatted <see cref="string"/>. | ||
/// </summary> | ||
/// <remarks> | ||
/// Used only if <see cref="Value "/> is <c>null</c> and <see cref="Process"/> calls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Referencing process can be misleading because there's also ProcessAsync
. Maybe ...and <see cref="InputTypeName" /> is not explicit or unknown.
Feel free to correct my failnglish 😄, I tried !
🐃 |
b4b01ff
to
f8b0249
Compare
febd5c4
to
d5d5f7f
Compare
rebased and updated |
if (tagBuilder != null) | ||
{ | ||
// This TagBuilder contains the one <input/> element of interest. Since this is not the "checkbox" | ||
// special -case, output is a self-closing element and can merge the TagBuilder in directly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: special-case
|
- also make `TagHelperOutputExtensions.MergeAttributes()` case-insensitive nits: - deliniate attribute names in all resource strings - update validation messages in TagHelperSample.Web
d5d5f7f
to
012e03e
Compare
<input/>
tag helper #1245 (mostly needs tests)