- {titlePosition === 'top' ? (
-
- {this.state.collapsed
- ? render('heading', title)
- : render('heading', collapseTitle || title)}
- {collapsable && }
-
- ) : null}
-
-
-
- {children
- ? typeof children === 'function'
- ? children(this.props)
- : children
- : body
- ? render('body', body)
- : null}
-
-
-
- {titlePosition === 'bottom' ? (
-
- {this.state.collapsed
- ? render('heading', title)
- : render('heading', collapseTitle || title)}
- {collapsable && }
-
- ) : null}
+ {dom}
);
}
diff --git a/src/renderers/Form/FieldSet.tsx b/src/renderers/Form/FieldSet.tsx
index f8067b895..78f1f4dee 100644
--- a/src/renderers/Form/FieldSet.tsx
+++ b/src/renderers/Form/FieldSet.tsx
@@ -117,7 +117,7 @@ export default class FieldSetControl extends React.Component<
className={className}
children={this.renderBody}
wrapperComponent="fieldset"
- headingComponent="legend"
+ headingComponent={rest.titlePosition === 'bottom' ? 'div' : 'legend'}
/>
);
}