Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behaviour of tables with multiple tbody elements #100

Closed
RogerDodger opened this issue Mar 9, 2016 · 3 comments
Closed

Behaviour of tables with multiple tbody elements #100

RogerDodger opened this issue Mar 9, 2016 · 3 comments

Comments

@RogerDodger
Copy link
Contributor

Consider a table with multiple tbody elements (and for simplicity, a thead with one row).

Currently, all of the table's rows except the first (the thead's) are merged into the first tbody and then sorted, leaving the rest of the tbody elements empty.

The expected behaviour is that each of the tbody elements' rows would be sorted amongst themselves.

@tristen
Copy link
Owner

tristen commented Mar 21, 2016

@RogerDodger thanks for the PR! Can you set up a jsbin that demonstrates this behaviour?

@RogerDodger
Copy link
Contributor Author

The tests I included should cover it.

The following table:

<table id="sort-multi">
  <thead>
    <tr><th></th></tr>
  </thead>
  <tbody>
    <tr><td>2</td></tr>
    <tr><td>1</td></tr>
    <tr><td>3</td></tr>
  </tbody>
  <tbody>
    <tr><td>3</td></tr>
    <tr><td>2</td></tr>
    <tr><td>4</td></tr>
  </tbody>
</table>

Should sort to ((1,2,3) (2,3,4)). Presently, it sorts to ((1, 2, 2, 3, 3, 4)()).

@tristen
Copy link
Owner

tristen commented Mar 30, 2016

👍 merged!

@tristen tristen closed this as completed Mar 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@tristen @RogerDodger and others