Skip to content

Commit

Permalink
Fix NumberFieldElement when min = 0
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaS98 committed Aug 9, 2024
1 parent b6472e2 commit 7c8529e
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 7c8529e

Please sign in to comment.