Commit f739b49
Enable input number component to support type='range' attribute (#55583)
* Commit modifies 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'.
Previously, the InputNumber component hardcoded the 'type' attribute as 'number', which prevented using it for other input types such as sliders (range inputs).
* Adding a test to the inputNumberTests to ensure the user defined type attribute overrides the default.
* Using the TestRederer to extract attributes and assert the user-defined type override the default
* Retrieving frames with new methodology
* Isolating the correct element to extract attributes from
* Only asserting the type attribute = range
* Isolating input element, atrributes and type attribute correctly
* Improving methodology of handling render tree frames and isolating the input element and attributes
* Ammendments to tests
* Update src/Components/Web/test/Forms/InputNumberTest.cs
Co-authored-by: Mackinnon Buck <[email protected]>
* Update src/Components/Web/test/Forms/InputNumberTest.cs
Co-authored-by: Mackinnon Buck <[email protected]>
* Update src/Components/Web/test/Forms/InputNumberTest.cs
Co-authored-by: Mackinnon Buck <[email protected]>
* re-adding missing tests
* Using helper methods in tests.
* Update src/Components/Web/test/Forms/InputNumberTest.cs
---------
Co-authored-by: Mackinnon Buck <[email protected]>1 parent 25db949 commit f739b49
File tree
2 files changed
+54
-2
lines changed- src/Components/Web
- src/Forms
- test/Forms
2 files changed
+54
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
4 | 10 | | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
8 | 23 | | |
9 | 24 | | |
10 | 25 | | |
| |||
49 | 64 | | |
50 | 65 | | |
51 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
52 | 104 | | |
53 | 105 | | |
54 | 106 | | |
| |||
0 commit comments