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

Commit fb36be9

Browse files
Port checkbox item to formik
1 parent d065afd commit fb36be9

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,33 +1,33 @@
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+
import { Input } from '../../../../../../../Form'
10+
911
// TODO: Collapse this code with the radio button UI
1012

11-
export default ({ data, rowIndex }) =>
13+
export default ({ name, index }) =>
1214
<>
1315
<Row form>
1416
<Col>
15-
<Control
16-
model=".label"
17+
<Field
18+
name={ `${ name }.label` }
1719
placeholder="Question"
1820
component={ Input }
19-
debounce={ 300 }
2021
/>
2122
</Col>
2223
</Row>
2324
<CodingGroup
24-
data={ data.options }
25-
model=".options"
26-
itemModel={ `.rows[${ rowIndex }][0]` }
25+
name={ `${ name }.options` }
2726
icon="square"
2827
/>
2928
<CollapsingOptions
30-
rowIndex={ rowIndex }
29+
name={ name }
30+
index={ index }
3131
shuffle={ true }
3232
/>
3333
</>

0 commit comments

Comments
 (0)