s72
  • Table sort

    data-sort since 0.1.0

    data-sort on a table makes every column head with text a sort button. Click once to sort up, again to sort down; the rows slide to their new places so a row can be followed.

    Basic

    Commits this week
    RepositoryMessageCommitsLast pushOpen
    atlasCap the retry budget at four attempts18
    ledgerTag 2.4 and write the release note6
    hummingbirdRevert the queue change that broke the tests11
    html
    <table data-sort>
      <caption>Commits this week</caption>
      <thead><tr><th>Repository</th><th>Message</th><th>Commits</th><th>Last push</th><th data-sort="none">Open</th></tr></thead>
      <tbody>
        <tr><td>atlas</td><td>Cap the retry budget at four attempts</td><td data-value="18">18</td><td><time datetime="2026-10-02T08:41">Today 08:41</time></td><td><button data-size="sm">Open</button></td></tr>
        <tr><td>ledger</td><td>Tag 2.4 and write the release note</td><td data-value="6">6</td><td><time datetime="2026-09-30T15:04">Wed 15:04</time></td><td><button data-size="sm">Open</button></td></tr>
        <tr><td>hummingbird</td><td>Revert the queue change that broke the tests</td><td data-value="11">11</td><td><time datetime="2026-09-30T18:26">Wed 18:26</time></td><td><button data-size="sm">Open</button></td></tr>
      </tbody>
    </table>

    th[data-sort="none"] opts the actions column out, and a head with no text is skipped anyway.

    Notes