Skip to content

Fix stale tablesort.$th reference after header clicks - #49

Open
dusan-maintains wants to merge 1 commit into
kylefox:masterfrom
dusan-maintains:maintenance/update-sorted-column-ref
Open

Fix stale tablesort.$th reference after header clicks#49
dusan-maintains wants to merge 1 commit into
kylefox:masterfrom
dusan-maintains:maintenance/update-sorted-column-ref

Conversation

@dusan-maintains

@dusan-maintains dusan-maintains commented Feb 27, 2026

Copy link
Copy Markdown

Summary

  • Update tablesort.$th on every successful sort call so the instance always tracks the currently sorted header.
  • Keep the minified artifact in sync with the source file.

Why

Test Plan

  1. Initialize plugin: $('table').tablesort().
  2. Click one header, then another.
  3. After each click, verify $('table').data('tablesort').$th points to the clicked <th>.
  4. Confirm existing sort direction toggling behavior is unchanged.

Compatibility

  • No API changes.
  • Existing sorting behavior is preserved; this only keeps documented instance state accurate.

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

Successfully merging this pull request may close these issues.

Memorize current sorted column when sorting by click Currently sorted column not updated

1 participant