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 showTitle = schema['x-decorator-props']?.showTitle ?? true;
|
||||||
const extra = useMemo(() => {
|
const extra = useMemo(() => {
|
||||||
return typeof field.description === 'string' ? (
|
if (field.description && field.description !== '') {
|
||||||
<div
|
return typeof field.description === 'string' ? (
|
||||||
dangerouslySetInnerHTML={{
|
<div
|
||||||
__html: HTMLEncode(field.description).split('\n').join('<br/>'),
|
dangerouslySetInnerHTML={{
|
||||||
}}
|
__html: HTMLEncode(field.description).split('\n').join('<br/>'),
|
||||||
/>
|
}}
|
||||||
) : (
|
/>
|
||||||
field.description
|
) : (
|
||||||
);
|
field.description
|
||||||
|
);
|
||||||
|
}
|
||||||
}, [field.description]);
|
}, [field.description]);
|
||||||
const className = useMemo(() => {
|
const className = useMemo(() => {
|
||||||
return cx(formItemWrapCss, {
|
return cx(formItemWrapCss, {
|
||||||
|
Loading…
Reference in New Issue
Block a user