fix(module: input-number): where automatic increase/decrease does not have to be stopped in rare cases. (#2317)

This commit is contained in:
David Raška 2022-03-02 09:49:46 +01:00 committed by GitHub
parent a6e44b7dbc
commit ad5a58dac4

View File

@ -311,6 +311,7 @@ namespace AntDesign
var num = _increaseFunc(Value, _step);
await ChangeValueAsync(num);
_increaseTokenSource?.Cancel();
_increaseTokenSource = new CancellationTokenSource();
_ = Increase(_increaseTokenSource.Token).ConfigureAwait(false);
}
@ -347,6 +348,7 @@ namespace AntDesign
var num = _decreaseFunc(Value, _step);
await ChangeValueAsync(num);
_decreaseTokenSource?.Cancel();
_decreaseTokenSource = new CancellationTokenSource();
_ = Decrease(_decreaseTokenSource.Token).ConfigureAwait(false);
}