Skip to content

Commit

Permalink
Fix #2803 by not using current-value but value
Browse files Browse the repository at this point in the history
  • Loading branch information
vnbaaij committed Oct 14, 2024
1 parent da2e02a commit 35d4533
Show file tree
Hide file tree
Showing 29 changed files with 55 additions and 54 deletions.
2 changes: 1 addition & 1 deletion src/Core/Components/NumberField/FluentNumberField.razor
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
max="@(ReadOnly ? value : Max)"
min="@(ReadOnly ? value : Min)"
id=@Id
current-value="@value"
value="@value"
disabled="@Disabled"
name=@Name
required="@Required"
Expand Down
1 change: 1 addition & 0 deletions src/Core/Components/NumberField/FluentNumberField.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ private static string GetStepAttributeValue()
// of it for us. We will only get asked to parse the T for nonempty inputs.
var targetType = Nullable.GetUnderlyingType(typeof(TValue)) ?? typeof(TValue);
if (targetType == typeof(sbyte) ||
targetType == typeof(byte) ||
targetType == typeof(int) ||
targetType == typeof(long) ||
targetType == typeof(short) ||
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" additional-parameter-name="additional-parameter-value" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" additional-parameter-name="additional-parameter-value" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" additional-parameter1-name="additional-parameter1-value" additional-parameter2-name="additional-parameter2-value" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" additional-parameter1-name="additional-parameter1-value" additional-parameter2-name="additional-parameter2-value" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" appearance="filled" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" appearance="filled" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field autofocus="" maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field autofocus="" maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field class="additional-css-class" maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field class="additional-css-class" maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field list="datalist" maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field list="datalist" maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" disabled="" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" disabled="" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field hide-step="" maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field hide-step="" maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

<label for="xxx" class="fluent-input-label" b-hum22yrq17="">My label
</label>
<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
<label for="xxx" class="fluent-input-label" b-hum22yrq17="">
<h1>My label</h1>
</label>
<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field maxlength="10" minlength="1" size="20" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="10" minlength="1" size="20" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field maxlength="14" minlength="1" size="20" step="1" max="2147483647" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="1" size="20" step="1" max="2147483647" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field maxlength="14" minlength="3" size="20" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="3" size="20" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field maxlength="14" minlength="1" size="20" step="1" min="-2147483648" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="1" size="20" step="1" min="-2147483648" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" name="xxx" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" name="xxx" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field placeholder="placeholder-value" maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field placeholder="placeholder-value" maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field readonly="" maxlength="14" minlength="1" size="20" step="1" max="100" min="100" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field readonly="" maxlength="14" minlength="1" size="20" step="1" max="100" min="100" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" required="" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" required="" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field maxlength="14" minlength="1" size="3" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="1" size="3" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field maxlength="14" minlength="1" size="20" step="3" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field maxlength="14" minlength="1" size="20" step="3" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-number-field style="background-color: red;" maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
<fluent-number-field style="background-color: red;" maxlength="14" minlength="1" size="20" step="1" id="xxx" value="100" appearance="outline" blazor:onchange="1" blazor:oninput="2" blazor:elementreference="xxx">100</fluent-number-field>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

<div style="width: 100%; height: 400px;" class="fluent-wizard" position="left" b-l81u9o5gjc="">
<ol b-l81u9o5gjc="">
<li status="previous" style="height: 100%;" b-a5o5s1yurv="">
<li status="previous" blazor:onclick="1" style="height: 100%;" b-a5o5s1yurv="">
<div class="fluent-wizard-icon" b-a5o5s1yurv="">
<svg style="width: 24px; fill: var(--accent-fill-rest); width: var(--fluent-wizard-circle-size);" focusable="false" viewBox="0 0 24 24" aria-hidden="true" blazor:onclick="2">
<svg style="width: 24px; fill: var(--accent-fill-rest); width: var(--fluent-wizard-circle-size);" focusable="false" viewBox="0 0 24 24" aria-hidden="true" blazor:onkeydown="4" blazor:onclick="5">
<path d="M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm3.22 6.97-4.47 4.47-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5c.3.3.77.3 1.06 0l5-5a.75.75 0 1 0-1.06-1.06Z"></path>
</svg>
</div>
Expand All @@ -12,9 +12,9 @@
<p typo="body" class="fluent-typography fluent-wizard-summary" b-1nnnfjehkp=""></p>
</div>
</li>
<li status="current" style="height: 100%;" b-a5o5s1yurv="">
<li status="current" blazor:onclick="2" style="height: 100%;" b-a5o5s1yurv="">
<div class="fluent-wizard-icon" b-a5o5s1yurv="">
<svg style="width: 24px; fill: var(--accent-fill-rest); width: var(--fluent-wizard-circle-size);" focusable="false" viewBox="0 0 24 24" aria-hidden="true" blazor:onclick="3">
<svg style="width: 24px; fill: var(--accent-fill-rest); width: var(--fluent-wizard-circle-size);" focusable="false" viewBox="0 0 24 24" aria-hidden="true" blazor:onkeydown="6" blazor:onclick="7">
<path d="M2 12a10 10 0 1120 0 10 10 0 01-20 0z"></path>
</svg>
</div>
Expand All @@ -26,24 +26,24 @@
</ol>
<div class="fluent-wizard-content" b-l81u9o5gjc="">
<div style="display: none;" b-l81u9o5gjc="">
<form blazor:onsubmit="5">
<fluent-number-field class="valid" maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="5" appearance="outline" blazor:onchange="7" blazor:oninput="8" blazor:elementreference=""></fluent-number-field>
<form blazor:onsubmit="9">
<fluent-number-field class="valid" maxlength="14" minlength="1" size="20" step="1" id="xxx" value="5" appearance="outline" blazor:onchange="11" blazor:oninput="12" blazor:elementreference=""></fluent-number-field>
</form>
</div>
<div style="" b-l81u9o5gjc="">
<form blazor:onsubmit="6">
<form blazor:onsubmit="10">
<div>
<ul class="validation-errors">
<li class="validation-message">The field NumberBetween1and10 must be between 1 and 10.</li>
</ul>
</div>
<fluent-number-field class="invalid" maxlength="14" minlength="1" size="20" step="1" id="xxx" current-value="15" appearance="outline" blazor:onchange="9" blazor:oninput="10" aria-invalid="true" blazor:elementreference=""></fluent-number-field>
<fluent-number-field class="invalid" maxlength="14" minlength="1" size="20" step="1" id="xxx" value="15" appearance="outline" blazor:onchange="13" blazor:oninput="14" aria-invalid="true" blazor:elementreference=""></fluent-number-field>
</form>
</div>
</div>
<div class="fluent-wizard-buttons" b-l81u9o5gjc="">
<fluent-button style="width: 80px;;" type="button" appearance="neutral" blazor:onclick="11" b-x1200685t0="" blazor:elementreference="">Previous</fluent-button>
<fluent-button style="width: 80px;;" type="button" appearance="neutral" blazor:onclick="15" b-x1200685t0="" blazor:elementreference="">Previous</fluent-button>
<span style="margin-right: 10px" b-l81u9o5gjc=""></span>
<fluent-button style="width: 80px;;" type="button" appearance="accent" blazor:onclick="12" b-x1200685t0="" blazor:elementreference="">Done</fluent-button>
<fluent-button style="width: 80px;;" type="button" appearance="accent" blazor:onclick="16" b-x1200685t0="" blazor:elementreference="">Done</fluent-button>
</div>
</div>
Loading

0 comments on commit 35d4533

Please sign in to comment.