Skip to content

Commit

Permalink
Merge pull request #2349 from graphcommerce-org/fix/numberfieldelement
Browse files Browse the repository at this point in the history
Fix NumberFieldElement when min = 0
  • Loading branch information
paales authored Aug 14, 2024
2 parents 8f852aa + 7c8529e commit 40f4748
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tiny-ghosts-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/ecommerce-ui': patch
---

Fix NumberFieldElement when min = 0
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export function NumberFieldElement<T extends FieldValues>(props: NumberFieldElem
size='smaller'
onClick={() => {
if (
(valueAsNumber || Infinity) <= inputProps.min ||
(valueAsNumber ?? Infinity) <= inputProps.min ||
(inputProps.min === 0 && valueAsNumber <= inputProps.min)
)
return
Expand Down

0 comments on commit 40f4748

Please sign in to comment.