mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-12 11:55:24 +08:00
fix(module: input): pressing enter would not update the value (#1094)
Co-authored-by: Luke Parker <10430890+TheRealHona@users.noreply.github.com> Co-authored-by: James Yeung <shunjiey@hotmail.com>
This commit is contained in:
parent
0a4364c869
commit
11fcd44993
@ -91,7 +91,7 @@ namespace AntDesign
|
||||
public EventCallback<FocusEventArgs> OnFocus { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public int DebounceMilliseconds { get; set; } = 500;
|
||||
public int DebounceMilliseconds { get; set; } = 250;
|
||||
|
||||
public Dictionary<string, object> Attributes { get; set; }
|
||||
|
||||
@ -190,7 +190,7 @@ namespace AntDesign
|
||||
{
|
||||
if (args != null && args.Key == "Enter" && EnableOnPressEnter)
|
||||
{
|
||||
await ChangeValue();
|
||||
await ChangeValue(true);
|
||||
await OnPressEnter.InvokeAsync(args);
|
||||
await OnPressEnterAsync();
|
||||
}
|
||||
@ -212,7 +212,7 @@ namespace AntDesign
|
||||
|
||||
protected async Task OnMouseUpAsync(MouseEventArgs args)
|
||||
{
|
||||
await ChangeValue();
|
||||
await ChangeValue(true);
|
||||
|
||||
if (OnMouseUp.HasDelegate) await OnMouseUp.InvokeAsync(args);
|
||||
}
|
||||
@ -296,14 +296,12 @@ namespace AntDesign
|
||||
DebounceChangeValue();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
_debounceTimer?.Dispose();
|
||||
if (_debounceTimer != null)
|
||||
{
|
||||
_debounceTimer = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!_compositionInputting)
|
||||
|
Loading…
Reference in New Issue
Block a user