Omit some props

pull/2821/head
Jérémy Rialland 2023-09-25 10:05:28 +02:00 committed by Jérémy Rialland
parent e373f9a99a
commit 20a51c6653
2 changed files with 8 additions and 3 deletions

View File

@ -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={

View File

@ -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 ??