mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-11-30 03:08:31 +08:00
fix: restore field height spacing after removing description in form (#4679)
This commit is contained in:
parent
6a751b596f
commit
6b6b69ae09
@ -65,15 +65,17 @@ export const FormItem: any = withDynamicSchemaProps(
|
||||
|
||||
const showTitle = schema['x-decorator-props']?.showTitle ?? true;
|
||||
const extra = useMemo(() => {
|
||||
return typeof field.description === 'string' ? (
|
||||
<div
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: HTMLEncode(field.description).split('\n').join('<br/>'),
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
field.description
|
||||
);
|
||||
if (field.description && field.description !== '') {
|
||||
return typeof field.description === 'string' ? (
|
||||
<div
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: HTMLEncode(field.description).split('\n').join('<br/>'),
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
field.description
|
||||
);
|
||||
}
|
||||
}, [field.description]);
|
||||
const className = useMemo(() => {
|
||||
return cx(formItemWrapCss, {
|
||||
|
Loading…
Reference in New Issue
Block a user