mardi 15 octobre 2019

Affect the text click to a checkbox in Reactjs

How to affect a text click to a checkbox? Now it works as when we click on a checkbox it is selected, I want to select it while I'm clicking on the corresponding text also. Here my code,

<tr key={taskList.PriorityID}>
            <td style=width><input type='radio' id={taskList.ID} name={'ID: ' + taskList.ID} onClick={_onclick} checked={selected} /></td>
            <td className="dashboard-post-payment_table-cell" title={'TaskList: ' + taskList.Priority}>{taskList.Priority}</td>     
</tr>

enter image description here




Aucun commentaire:

Enregistrer un commentaire