tsorter icon indicating copy to clipboard operation
tsorter copied to clipboard

Treats row headers as col headers

Open rotsee opened this issue 7 years ago • 0 comments

It seems like the table is sorted whenever the uses clikcs a th element. th can, however, be used for rows as well as for columns (and for rowgroups, but that's rarely seen in the wild). Clicking on such cells should probably not trigger a re-sort-

Example:

    <table>
      <thead>
        <tr>
          <th scope="col" data-tsorter="str">City
          <th scope="col" data-tsorter="num">Population
        </tr>
      </thead>
      <tbody>
          <tr>
            <th scope="row">Berlin
            <td>1,234,567
          </tr>
          <tr>
            <th scope="row">Berlin
            <td>1,234,567
          </tr>
      </tbody>
    </table>

rotsee avatar Dec 03 '17 18:12 rotsee