mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-26 13:35:16 +03:00
Fixed Radix UI related custom validity error (#20829)
ref DES-755 - a direct child of a form control primitive should be a form element - for TextField component, a div was the direct child - this moves the input element to the form control primitive
This commit is contained in:
parent
9449e0a048
commit
0cf987ebff
@ -107,13 +107,13 @@ const TextField: React.FC<TextFieldProps> = ({
|
|||||||
|
|
||||||
field = (
|
field = (
|
||||||
<FormPrimitive.Field name={id} asChild>
|
<FormPrimitive.Field name={id} asChild>
|
||||||
<FormPrimitive.Control asChild>
|
|
||||||
<div className={fieldContainerClasses}>
|
<div className={fieldContainerClasses}>
|
||||||
|
<FormPrimitive.Control asChild>
|
||||||
{inputField}
|
{inputField}
|
||||||
|
</FormPrimitive.Control>
|
||||||
{!unstyled && !clearBg && <div className={bgClasses ? bgClasses : ''}></div>}
|
{!unstyled && !clearBg && <div className={bgClasses ? bgClasses : ''}></div>}
|
||||||
{rightPlaceholder && <span className={rightPlaceholderClasses || ''}>{rightPlaceholder}</span>}
|
{rightPlaceholder && <span className={rightPlaceholderClasses || ''}>{rightPlaceholder}</span>}
|
||||||
</div>
|
</div>
|
||||||
</FormPrimitive.Control>
|
|
||||||
</FormPrimitive.Field>
|
</FormPrimitive.Field>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user