Skip to content

Commit edcf0b0

Browse files
committed
actually fix the type error by getting rid of the spread
1 parent 135783b commit edcf0b0

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

app/components/form/fields/NumberField.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { useId } from 'react'
1010
import type { FieldPathByValue, FieldValues } from 'react-hook-form'
1111
import { Controller } from 'react-hook-form'
1212

13-
import type { NumberInputProps as UINumberFieldProps } from '@oxide/ui'
1413
import { FieldLabel, TextInputHint, NumberInput as UINumberField } from '@oxide/ui'
1514
import { capitalize } from '@oxide/util'
1615

@@ -70,8 +69,7 @@ export const NumberFieldInner = <
7069
description,
7170
required,
7271
id: idProp,
73-
...props
74-
}: TextFieldProps<TFieldValues, TName> & UINumberFieldProps) => {
72+
}: TextFieldProps<TFieldValues, TName>) => {
7573
const generatedId = useId()
7674
const id = idProp || generatedId
7775

@@ -85,19 +83,17 @@ export const NumberFieldInner = <
8583
<>
8684
<UINumberField
8785
id={id}
88-
title={label}
86+
// title={label}
8987
error={!!error}
9088
aria-labelledby={cn(`${id}-label`, {
9189
[`${id}-help-text`]: !!description,
9290
})}
9391
aria-describedby={description ? `${id}-label-tip` : undefined}
94-
{...fieldRest}
95-
{...props}
96-
// these have to go after the spread so they take precedence
9792
defaultValue={value}
9893
onChange={(val) => {
9994
onChange(val)
10095
}}
96+
{...fieldRest}
10197
/>
10298
<ErrorMessage error={error} label={label} />
10399
</>

0 commit comments

Comments
 (0)