Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Commit d065afd

Browse files
Port multiple choice item to formik
1 parent f3b92ad commit d065afd

File tree

1 file changed

+10
-10
lines changed
  • packages/builder/src/components/ComponentOptions/components/Content/Page/components/ItemOptions/components

1 file changed

+10
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
import React from 'react'
22

3-
import { Control } from 'react-redux-form'
4-
import { Row, Col, Input } from 'reactstrap'
3+
import { Field } from 'formik'
4+
import { Row, Col } from 'reactstrap'
55

66
import { CodingGroup } from './Coding'
77
import { CollapsingOptions } from './BaseOptions'
88

9-
export default ({ data, rowIndex }) =>
9+
import { Input } from '../../../../../../../Form'
10+
11+
export default ({ name, index }) =>
1012
<>
1113
<Row form>
1214
<Col>
13-
<Control
14-
model=".label"
15+
<Field
16+
name={ `${ name }.label` }
1517
placeholder="Question"
1618
component={ Input }
17-
debounce={ 300 }
1819
/>
1920
</Col>
2021
</Row>
2122
<CodingGroup
22-
data={ data.options }
23-
model=".options"
24-
itemModel={ `.rows[${ rowIndex }][0]` }
23+
name={ `${ name }.options` }
2524
icon="circle"
2625
/>
2726
<CollapsingOptions
28-
rowIndex={ rowIndex }
27+
name={ name }
28+
index={ index }
2929
shuffle={ true }
3030
/>
3131
</>

0 commit comments

Comments
 (0)