Blazorise
Blazorise copied to clipboard
NumericPicker wrong order of execution and debounced inconsistent
Describe the bug
If the max/min value of a NumericPicker picker is set this is only enforced while using the increase/decrease button provided by the NumericPicker. If the user enters a value manually things get wrong:
- User enter 50, ValueChanged is triggered after the debounce interval
- User now leaves the NumericPicker, Max is validated and 50 reduce to 36, ValueChanged is again triggered
I think there are two logical solutions:
a. Do not send ValueChanged before validating Max and correct the value b. Do not allow the enter an incorrect value
<NumericPicker TValue="int"
Immediate="true"
Debounce="true"
DebounceInterval="750"
Min="1"
Max="36"
Decimals="0"
ValueChanged="@(async x => { something; })"
Value="@_someVariable"/>
When using the arrows on the keyboard or the ui elements to decrease/increase the value debounced is ignored and ValueChanged is fired instantly.
Debounced should be used in any input method and not only manuell input per keyboard.
Thanks Manuel