I'm trying to set the name in a checkbox input but it seems it doesn't work:
const DepartmentRow = ({ data }) =>
<tbody>
<tr>
<td><input type="checkbox" name="ListOfDepartments" value={data.department}/>
<span>{data.departament}</span>
</td>
</tr>
</tbody>;
DepartmentRow.propTypes = {
data: PropTypes.object
};
In data I receive an user object that has a department. If I write:
<td>{data.department}</td>
it works and it displays the name of the department, so I receive the right information on data.
This is what I got for the moment:
Thank you!
Aucun commentaire:
Enregistrer un commentaire