Skip to content

Commit

Permalink
Merge pull request #2419 from graphcommerce-org/fix/numberfield-element
Browse files Browse the repository at this point in the history
refactor: Destructure InputProps to ensure they are passed only to relevant components.
  • Loading branch information
paales authored Nov 20, 2024
2 parents 12fd37e + ccd952e commit 55c3134
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/soft-turtles-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/ecommerce-ui': patch
---

Destructure InputProps to ensure they are passed only to relevant components.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export function NumberFieldElement<T extends FieldValues>(props: NumberFieldElem
DownProps = {},
UpProps = {},
inputProps = {},
InputProps = {},
sx = [],
size = 'medium',
control,
Expand Down Expand Up @@ -113,7 +114,7 @@ export function NumberFieldElement<T extends FieldValues>(props: NumberFieldElem
]}
autoComplete='off'
InputProps={{
...textFieldProps.InputProps,
...InputProps,
startAdornment: (
<Fab
aria-label={i18n._(/* i18n */ 'Decrease')}
Expand Down

0 comments on commit 55c3134

Please sign in to comment.