remove icon label from text input (#21025)

This commit is contained in:
Erik Jan de Wit 2023-06-19 08:35:56 +02:00 committed by GitHub
parent 73daf8b540
commit 310aa43f16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,7 @@ export const TextControl = <
>(
props: TextControlProps<T, P>
) => {
const { labelIcon, ...rest } = props;
const required = !!props.rules?.required;
const defaultValue = props.defaultValue ?? ("" as PathValue<T, P>);
@ -38,7 +39,7 @@ export const TextControl = <
<FormLabel
name={props.name}
label={props.label}
labelIcon={props.labelIcon}
labelIcon={labelIcon}
isRequired={required}
error={fieldState.error}
>
@ -50,7 +51,7 @@ export const TextControl = <
fieldState.error ? ValidatedOptions.error : ValidatedOptions.default
}
isDisabled={props.isDisabled}
{...props}
{...rest}
{...field}
/>
</FormLabel>