-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Enable input number component to support type='range' attribute #55583
Enable input number component to support type='range' attribute #55583
Conversation
…te specified by the user to take precedence over the default 'type="number"'. By swapping the order in which attributes are added to the builder, any user-defined 'type' attribute is now respected, enabling the usage of different input types like 'range'. Previously, the InputNumber component hardcoded the 'type' attribute as 'number', which prevented using it for other input types such as sliders (range inputs).
… attribute overrides the default.
…rt-type='range'-Attribute
…ed type override the default
…tribute' of https://github.com/MattyLeslie/aspnetcore into Enable-InputNumber-Component-to-Support-type='range'-Attribute
…e input element and attributes
Commenter does not have sufficient privileges for PR 55583 in repo dotnet/aspnetcore |
…rt-type='range'-Attribute
/azp run aspnetcore-ci |
Azure Pipelines successfully started running 1 pipeline(s). |
…rt-type='range'-Attribute
@MackinnonBuck, may I please request a review on this. |
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 working on this, @MattyLeslie!
The framework change looks good - I've just added some comments about the test code 🙂
Co-authored-by: Mackinnon Buck <[email protected]>
Co-authored-by: Mackinnon Buck <[email protected]>
Co-authored-by: Mackinnon Buck <[email protected]>
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.
This looks great, thank you @MattyLeslie! 🎉
Enable input number component to support type='range' attribute
Summary of the changes
Modified the
InputNumber
component to allow the 'type' attribute specified by the user to take precedence over the default 'type="number"'. By swapping the order in which attributes are added to the builder, any user-defined 'type' attribute is now respected, enabling the usage of different input types like 'range'.Added a unit test to
InputNumberTests
to ensure the user definedtype
attribute overrides the defaultFixes #52067 by ensuring the type of the InputNumber component can be specified.