Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Using type=text for float and double types #2812

Merged
merged 1 commit into from
Jul 14, 2015
Merged

Conversation

ajaybhargavb
Copy link
Contributor

Issue - #2780
Partly related issue - #2712

@dougbu

@dougbu
Copy link
Member

dougbu commented Jul 14, 2015

Not quiet complete.

The commit to partially revert for this fix is 73e8fc1. Note that commit also updated the <input> tag helper and associated tests. (Easy to miss because the relevant dictionary uses nameof(type) constants instead of typeof(alias).Name aliases.)

@dougbu
Copy link
Member

dougbu commented Jul 14, 2015

@ajaybhargavb
Copy link
Contributor Author

Updated.

@@ -43,8 +43,6 @@ public class InputTagHelper : TagHelper
{ nameof(UInt32), "number" },
{ nameof(Int64), "number" },
{ nameof(UInt64), "number" },
{ nameof(Single), "number" },
{ nameof(Double), "number" },
{ nameof(Boolean), InputType.CheckBox.ToString().ToLowerInvariant() },
{ nameof(Decimal), InputType.Text.ToString().ToLowerInvariant() },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also remove this line because the template is not decimal-specific and is now inconsistent with how float and double reach type="text".

Alternatively restore the float and double lines with value InputType.Text.ToString().ToLowerInvariant(). This alternative will behave no differently (well, it'll save one lookup iteration) but will make the table appear even-more different from that in TemplateRenderer. Of course that table is different because we have a decimal-specific template there.

@dougbu
Copy link
Member

dougbu commented Jul 14, 2015

:shipit:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants