Skip to content

Wrong behavior when stupid_table is inside an other table (bug) #170

Description

@wisedevman

Hi,
very useful and light script.

I think I've found a bug when a stupid table is inside an other table. Sorting by other columns except the first fails.

The bug is where the code compute th_index, because parents() get the outer tr (of the outer table).

I fixed it in this way:

    // Account for colspans
$this_th.parents("tr").find("th").slice(0, $(this).index()).each(function() {

should read

    // Account for colspans
$this_th.parent("tr").find("th").slice(0, $(this).index()).each(function() {

If you agree please update the repo, thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions