|
| 1 | +/* eslint react/prop-types: "off" */ |
1 | 2 | import React, { Fragment } from 'react'; |
2 | 3 | import FormRender, { layoutComponents, componentTypes } from '@data-driven-forms/react-form-renderer'; |
3 | 4 |
|
@@ -30,17 +31,12 @@ const Button = ({ children, label, variant, ...props }) => <button style={ getBu |
30 | 31 | const layoutComponent = { |
31 | 32 | [layoutComponents.FORM_WRAPPER]: FormWrapper, |
32 | 33 | [layoutComponents.BUTTON]: Button, |
33 | | - [layoutComponents.COL]: Fragment, |
34 | | - [layoutComponents.FORM_GROUP]: Fragment, |
35 | | - [layoutComponents.BUTTON_GROUP]: Fragment, |
36 | | - [layoutComponents.ICON]: Fragment, |
37 | | - [layoutComponents.ARRAY_FIELD_WRAPPER]: Fragment, |
38 | | - [layoutComponents.HELP_BLOCK]: Fragment, |
| 34 | + [layoutComponents.BUTTON_GROUP]: ({ key, children }) => <Fragment key={ key }>{ children }</Fragment>, |
39 | 35 | [layoutComponents.TITLE]: Title, |
40 | 36 | [layoutComponents.DESCRIPTION]: Description, |
41 | 37 | }; |
42 | 38 |
|
43 | | -const TextField = ({ formOptions, customProp, label, input, isRequired, meta: { error, touched }, FieldProvider, dataType, ...props }) => ( |
| 39 | +const TextField = ({ formOptions, customProp, label, input, isRequired, meta: { error, touched }, FieldProvider, FieldArrayProvider, dataType, ...props }) => ( |
44 | 40 | <div className={ `ddorg__demo-formGroup ${isRequired ? 'required' : ''} ${error ? 'error' : ''}` }> |
45 | 41 | <label htmlFor={ input.name }>{ label }</label> |
46 | 42 | <input id={ input.name } { ...input } { ...props } /> |
|
0 commit comments