Skip to content
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
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

MattyLeslie
Copy link
Contributor

Enable input number component to support type='range' attribute

Summary of the changes

  1. 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'.

  2. Added a unit test to InputNumberTests to ensure the user defined type attribute overrides the default

Fixes #52067 by ensuring the type of the InputNumber component can be specified.

MattyLeslie and others added 3 commits May 7, 2024 09:55
…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).
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label May 7, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label May 7, 2024
Copy link
Contributor

Thanks for your PR, @MattyLeslie. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@mkArtakMSFT mkArtakMSFT assigned javiercn and MackinnonBuck and unassigned javiercn May 8, 2024
@MattyLeslie MattyLeslie marked this pull request as ready for review May 20, 2024 18:24
@MattyLeslie MattyLeslie requested a review from a team as a code owner May 20, 2024 18:24
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an inputRange component like the basic inputNumber components
3 participants