question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Descending sort on existing table

See original GitHub issue

There should be a way to sort a column by descending order on an existing table.

Maybe by adding data-desc on the th or something.

Issue Analytics

  • State:open
  • Created 11 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
javvecommented, Mar 15, 2013

Ah, is it correct that you would like to have button that always sorts the list desc or asc.

In the next version of the script I’ve added a feature so that you can write <button data-sort="name" data-order="desc">Sort name desc</button>.

Would that solve your issue?

1reaction
sindresorhuscommented, Apr 6, 2013

Ah, is it correct that you would like to have button that always sorts the list desc or asc.

I want to set the sorting order on each button, if I eg set desc order on one, I want it to sort desc on the first click and then asc on the next and so on. Buttons should not share sorting state.

Would that solve your issue?

As long as they don’t share sorting state, yes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SELECT FROM table in DESCENDING ORDER of a column
To sort rows of a result set in descending order of values in a column, use the syntax of the following SQL Query....
Read more >
SQL ORDER BY Keyword - W3Schools
The ORDER BY keyword sorts the records in ascending order by default. To sort the records in descending order, use the DESC keyword....
Read more >
Ascending Order with SQL Order By - freeCodeCamp
ORDER BY syntax ... This is the basic syntax to sort your data in ascending order: SELECT columns FROM table ORDER BY column;....
Read more >
SQL - ORDER BY - GeeksforGeeks
The ORDER BY statement in SQL is used to sort the fetched data in either ascending or descending according to one or more...
Read more >
How to Sort in SQL | LearnSQL.com
Problem: You would like to sort the result of an SQL query in ascending or descending order. Example: Our database has a table...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found