remove icon label from text input (#21025)
This commit is contained in:
parent
73daf8b540
commit
310aa43f16
1 changed files with 3 additions and 2 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue