Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@namespace Bit.BlazorUI
@namespace Bit.BlazorUI
@inherits BitTextInputBase<TValue>
@typeparam TValue

Expand Down Expand Up @@ -110,9 +110,10 @@
@onkeydown="HandleOnKeyDown"
@onfocusin="HandleOnFocusIn"
@onfocusout="HandleOnFocusOut"
@onchange="HandleOnStringValueChangeAsync"
@oninput="HandleOnStringValueInputAsync"
@onwheel="HandleOnMouseWheel"
@bind-value:get="@CurrentValueAsString"
@bind-value:set="@HandleOnStringValueSet"
@bind-value:event="@(Immediate ? "oninput" : "onchange")"
form=""
min="@_min"
max="@_max"
Expand All @@ -126,7 +127,6 @@
inputmode="@_inputMode"
placeholder="@Placeholder"
aria-labelledby="@_labelId"
value="@CurrentValueAsString"
disabled="@(IsEnabled is false)"
class="bit-nfl-inp@(Mode == BitSpinButtonMode.Spread ? " bit-nfl-cin" : "") @Classes?.Input"
autocomplete="@(AutoComplete ?? "off")"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,14 @@ protected override Task HandleOnStringValueChangeAsync(ChangeEventArgs e)
return base.HandleOnStringValueChangeAsync(e);
}


async Task HandleOnStringValueSet(string? value)
{
var args = new ChangeEventArgs() { Value = value };
if (Immediate)
await HandleOnStringValueInputAsync(args);
else
await HandleOnStringValueChangeAsync(args);
}

private async Task HandleOnKeyDown(KeyboardEventArgs e)
{
Expand Down
Loading