Skip to content

Commit

Permalink
NumberFieldElement wouldn’t pass the min/max/step values
Browse files Browse the repository at this point in the history
  • Loading branch information
paales committed Oct 14, 2024
1 parent 02d5e2f commit 0ba0c61
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,15 @@ export function NumberFieldElement<T extends FieldValues>(props: NumberFieldElem
slotProps={{
input: {
...textFieldProps.slotProps?.input,
min,
max,
step,
startAdornment: (
<Fab
aria-label={i18n._(/* i18n */ 'Decrease')}
size='smaller'
onClick={() => {
const minVal = -Infinity
const minVal = min ?? -Infinity
if (
(valueAsNumber ?? Infinity) <= minVal ||
(minVal === 0 && valueAsNumber <= minVal)
Expand Down

0 comments on commit 0ba0c61

Please sign in to comment.