jeudi 15 juin 2017

using Material-ui checkboxes with the reactjs and redux

Im want to display the selected checkbox items. For which Im using material-ui checkbox , so right now Im able only able to display the items with checkboxes but not able to display the selected items. I know it is easy but Im new to reactjs and redux so finding it difficult to start. Hoping for a help.Thank you.

this.state = {
            data: [apple, kiwi, banana, lime, orange, grape],
        }}
    handleCheck(x) {
        this.state.checkedValues.push(x);
    }
render(){
       {this.state.data.map((x) =>
             <Checkbox
               label={x} key={x.toString()}
               onCheck={() => this.handleCheck(x)}
               checked=true
              }/>
          )}}




Aucun commentaire:

Enregistrer un commentaire