Omit some props
parent
e373f9a99a
commit
20a51c6653
|
@ -113,11 +113,12 @@ export default function NumberField(props: NumberFieldProps) {
|
|||
>
|
||||
<StyledNumberInput
|
||||
{...(omit(
|
||||
props,
|
||||
props as typeof props & { dottedName?: string },
|
||||
'label',
|
||||
'small',
|
||||
'formatOptions',
|
||||
'displayedUnit'
|
||||
'displayedUnit',
|
||||
'dottedName'
|
||||
) as HTMLAttributes<HTMLInputElement>)}
|
||||
{...inputWithCursorHandlingProps}
|
||||
placeholder={
|
||||
|
|
|
@ -25,7 +25,11 @@ export default function TextField(props: TextFieldProps) {
|
|||
$hasLabel={!!props.label && !props.small}
|
||||
>
|
||||
<StyledInput
|
||||
{...(omit(props, 'label') as HTMLAttributes<HTMLInputElement>)}
|
||||
{...(omit(
|
||||
props,
|
||||
'label',
|
||||
'errorMessage'
|
||||
) as HTMLAttributes<HTMLInputElement>)}
|
||||
{...(inputProps as HTMLAttributes<HTMLInputElement>)}
|
||||
placeholder={
|
||||
(inputProps as HTMLAttributes<HTMLInputElement>).placeholder ??
|
||||
|
|
Loading…
Reference in New Issue