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

Commit

Permalink
Port checkbox item to formik
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixHenninger committed Aug 6, 2020
1 parent d065afd commit fb36be9
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
import React from 'react'

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

import { CodingGroup } from './Coding'
import { CollapsingOptions } from './BaseOptions'

import { Input } from '../../../../../../../Form'

// TODO: Collapse this code with the radio button UI

export default ({ data, rowIndex }) =>
export default ({ name, index }) =>
<>
<Row form>
<Col>
<Control
model=".label"
<Field
name={ `${ name }.label` }
placeholder="Question"
component={ Input }
debounce={ 300 }
/>
</Col>
</Row>
<CodingGroup
data={ data.options }
model=".options"
itemModel={ `.rows[${ rowIndex }][0]` }
name={ `${ name }.options` }
icon="square"
/>
<CollapsingOptions
rowIndex={ rowIndex }
name={ name }
index={ index }
shuffle={ true }
/>
</>

0 comments on commit fb36be9

Please sign in to comment.