Skip to content

add sort order to onSort function arguments - #1332

Merged
SergioCrisostomo merged 1 commit into
mootools:masterfrom
SergioCrisostomo:sort-direction
Oct 27, 2015
Merged

add sort order to onSort function arguments#1332
SergioCrisostomo merged 1 commit into
mootools:masterfrom
SergioCrisostomo:sort-direction

Conversation

@SergioCrisostomo

Copy link
Copy Markdown
Member

When sorting a table the onSort function does not tell which direction the sort happens.
Following @oskarkrawczyk 's work I made this PR to fix that.

This would make possible to know if if the reversed state is true or false.

fixes #1193

Comment thread Docs/Interface/HtmlTable.Sort.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't super clear. I'd do:

sort - callback executed when a column is sorted; passed the *tbody* (Element), the index of the column sorted (Integer) and which direction the table is sorted ("asc" or "desc").

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 will do

SergioCrisostomo added a commit that referenced this pull request Oct 27, 2015
add sort order to onSort function arguments
@SergioCrisostomo
SergioCrisostomo merged commit c6a90c3 into mootools:master Oct 27, 2015
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.

Sorting direction as the third argument in onSort

2 participants