Skip to content

Commit 54cb9ea

Browse files
committed
Changed demoSchema to use subform as a wrapper on all the components.
1 parent ee6a1c7 commit 54cb9ea

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/ant-component-mapper/src/files/sub-form.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
import React from 'react';
1+
import React, { Fragment } from 'react';
22
import PropTypes from 'prop-types';
33
import { Typography, Row, Col } from 'antd';
44

55
import { useFormApi } from '@data-driven-forms/react-form-renderer';
66

77
const { Title, Paragraph } = Typography;
88
const SubForm = ({ fields, title, description, FormSpyProvider: _FormSpyProvider, validate: _validate, ...rest }) => {
9+
//rest not used. rest ={type, label, name, options, isRequired}
910
const { renderForm } = useFormApi();
1011
return (
11-
<div>
12+
<Fragment>
1213
{title && (
1314
<Row>
1415
<Col span={24}>
15-
<Title>{title}</Title>
16+
<Title level={3}>{title}</Title>
1617
</Col>
1718
</Row>
1819
)}
@@ -26,7 +27,7 @@ const SubForm = ({ fields, title, description, FormSpyProvider: _FormSpyProvider
2627
<Row>
2728
<Col span={24}>{renderForm(fields)}</Col>
2829
</Row>
29-
</div>
30+
</Fragment>
3031
);
3132
};
3233

0 commit comments

Comments
 (0)