{
columns.columnNames && columns.columnNames.map(el => {
return (
<div>
<input type="checkbox" value={el} onChange={this.select_MS.bind(this)} /> {el}
</div>
)
})
}
OnChange event looks like this
select_MS(event) {
var permissions = this.state.permissions;
if (event.target.checked) {
permissions.push(
event.target.value
)
}
this.setState({permissions: permissions});
After checked on 3 elements its displaying in array }
After uncheck from the elements in the array it is still showing
May i know what i am doing wrong.
Aucun commentaire:
Enregistrer un commentaire