How do I render a table with a checkbox on each row? In Drupal 7, I could achieve this using the following code.

$form['table'] = array(
  '#type' =&gt; 'tableselect',
  '#header' =&gt; $header,
  '#options' =&gt; $options,
  '#empty' =&gt; t('No data')
);


This doesn't work anymore in Drupal 8. I just want a page similar to the one at /admin/people. What's the correct way in Drupal 8?
The form element type "tableselect" is available in Drupal 8


  Description: A table created with a far left column of radios or
  checkboxes. Build the table headings and columns with the #headers
  property, and the rows with the #options property.


https://api.drupal.org/api/drupal/developer%21topics%21forms_api_reference.html/8#tableselect

More info on "Adding checkboxes to a table" can be found in the handbook documentation here: https://www.drupal.org/node/945102