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
Open
MattyLeslie
wants to merge
11
commits into
dotnet:main
Choose a base branch
from
MattyLeslie:Enable-InputNumber-Component-to-Support-type='range'-Attribute
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Enable input number component to support type='range' attribute #55583
MattyLeslie
wants to merge
11
commits into
dotnet:main
from
MattyLeslie:Enable-InputNumber-Component-to-Support-type='range'-Attribute
+67
−28
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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
dotnet-policy-service
bot
added
the
community-contribution
Indicates that the PR has been added by a community member
label
May 7, 2024
Thanks for your PR, @MattyLeslie. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
…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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-blazor
Includes: Blazor, Razor Components
community-contribution
Indicates that the PR has been added by a community member
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.