Is it possible to have different step in NumberField and NumberFieldDecrement/Increment? #1194
Unanswered
vas11yev1work
asked this question in
Q&A
Replies: 2 comments 2 replies
-
PR #1202 (I think I'm not doing it right let's see other maintainers' reviews) After this PR gets merged you do something like <NumberField
locale="ru-RU"
:min="1"
:default-value="undefined"
:format-options="{ style: 'currency', currency: 'RUB' }"
:step="0.01" // if i set 1, i will not be able to set a decimal value into the input
@update:model-value="setNumber('priceWithDiscount', $event)"
v-slot="{ handleIncrease, handleDecrease }"
>
<NumberFieldContent>
<NumberFieldDecrement /> // decrease by 0.01
<FormControl>
<NumberFieldInput />
</FormControl>
<NumberFieldIncrement /> // increase by 0.01
</NumberFieldContent>
<Button @click="handleIncrease(0.05)">Custom Button increase by 0.05</Button>
</NumberField> |
Beta Was this translation helpful? Give feedback.
2 replies
-
Unfortunately currently However I also noticed a small bug were you were unable to set 3 fraction digit, it always clamp the value up. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I use shadcn-vue, but I notice this problem in radix-vue.
I want to be able to enter a deciman number (e.g. 0.05) in the input field, but at the same time, when pressing the inc/dec buttons, increase/decrease the value not by 0.01
Beta Was this translation helpful? Give feedback.
All reactions