Skip to content

Commit

Permalink
Fix: default table sort was always ascending (#444)
Browse files Browse the repository at this point in the history
An ascending sort order is always triggered when then target index is different
from the tablesort index. This was always true on a page (re)load, because
index is initialized with null.  By setting the instance' index to the
default-sort column index we assure that the direction parameter to sort() is
used.

See https://github.com/kylefox/jquery-tablesort/blob/master/jquery.tablesort.js#L42


Co-authored-by: Raphaël Pinson <[email protected]>
  • Loading branch information
octomike and raphink authored Jul 29, 2020
1 parent 71a62c1 commit 067438d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions puppetboard/static/js/tables.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 067438d

Please sign in to comment.