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>
|
props: TextControlProps<T, P>
|
||||||
) => {
|
) => {
|
||||||
|
const { labelIcon, ...rest } = props;
|
||||||
const required = !!props.rules?.required;
|
const required = !!props.rules?.required;
|
||||||
const defaultValue = props.defaultValue ?? ("" as PathValue<T, P>);
|
const defaultValue = props.defaultValue ?? ("" as PathValue<T, P>);
|
||||||
|
|
||||||
|
@ -38,7 +39,7 @@ export const TextControl = <
|
||||||
<FormLabel
|
<FormLabel
|
||||||
name={props.name}
|
name={props.name}
|
||||||
label={props.label}
|
label={props.label}
|
||||||
labelIcon={props.labelIcon}
|
labelIcon={labelIcon}
|
||||||
isRequired={required}
|
isRequired={required}
|
||||||
error={fieldState.error}
|
error={fieldState.error}
|
||||||
>
|
>
|
||||||
|
@ -50,7 +51,7 @@ export const TextControl = <
|
||||||
fieldState.error ? ValidatedOptions.error : ValidatedOptions.default
|
fieldState.error ? ValidatedOptions.error : ValidatedOptions.default
|
||||||
}
|
}
|
||||||
isDisabled={props.isDisabled}
|
isDisabled={props.isDisabled}
|
||||||
{...props}
|
{...rest}
|
||||||
{...field}
|
{...field}
|
||||||
/>
|
/>
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
|
|
Loading…
Reference in a new issue