score:32

Accepted answer

Put the <input> inside a <td>.

score:0

You must put it in a <td> Element, and you can add styles to the <td> DOM.

score:1

tr can only contain td. You should wrap your input with a td.

<tbody key={rule._id}>
  <tr>
    <td>{rule.deviceId}</td>
    <td> 
      <input
        name="isEnabled"
        type="checkbox"
        checked={rule.enabled}
      />
    </td>
    <td>{rule.name}</td>
  </tr>
</tbody>

score:3

You missed one <td> pair. Also the { and } are not required. Should be like that

<tbody key={rule._id}>
  <tr>
    <td>{rule.deviceId}</td>
    <td>
      <input
        name="isEnabled"
        type="checkbox"
        checked={rule.enabled} />
    </td>
    <td>{rule.name}</td>
  </tr>
</tbody>

Related Query

More Query from same tag