-
-
Notifications
You must be signed in to change notification settings - Fork 999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MaxLength parameter for InputNumber #3455
Conversation
Add MaxLength parameter for InputNumber.
@dotnet-policy-service agree |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3455 +/- ##
==========================================
- Coverage 45.39% 43.62% -1.77%
==========================================
Files 560 560
Lines 26851 26849 -2
Branches 268 5453 +5185
==========================================
- Hits 12190 11714 -476
+ Misses 14621 14176 -445
- Partials 40 959 +919
☔ View full report in Codecov by Sentry. |
@@ -59,6 +59,9 @@ public TValue DefaultValue | |||
[Parameter] | |||
public TValue Min { get; set; } | |||
|
|||
[Parameter] | |||
public int MaxLength { get; set; } = -1; |
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.
Please set the default value to null
so that the maxlength
attribute would not be generated by default.
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.
Thanks for your reply! Updated in the latest commit.
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.
The property type also need to be nullable int?
Thanks for contribution @chazikaifa , plase updaet the API doc for the component. |
Hello @chazikaifa ,please change the type to |
Sorry for taking so long. I cannot push code in my working place and my private VPN is down these days. |
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.
LGTM
Add MaxLength parameter for InputNumber.
🤔 This is a ...
🔗 Related issue link
InputNumber doesn't have attribute for maxlength #3454
💡 Background and solution
As described in the issue, the parameter Max and Min can NOT completely replace the function of maxlength for the component
<InputNumber>
. Parameter Maxlength is added and apply to the<input>
.📝 Changelog
☑️ Self Check before Merge