Repository navigation
|
Am I correct to use applySort to apply multiple search params? Given the following:
And code: The data table only sorts on the 'firstName' column. I'm trying to get it to sort "lastName" then "firstName". |
Replies: 4 comments 3 replies
|
Your code is correct I think the columns are sorted correctly in the order given in |
|
Hi @vincjo, thank you for your response and for building and maintaining this great tool! I think I'm still missing something. Is the "sorted column" state the visual indicator? That visual indicator is specifying Here is the actual code and console log of Can I somehow use .getSort() to determine exactly the current sort being applied to the table? |
|
Thx I guess you expect last names to be sorted alphabetically. But if 2 people have the same, then the first names are sorted too, right? Literally “sorting last names and first names”. If you do it manually by clicking on the table, you must 1) click on handler.sortAsc('nameFirst')
handler.sortAsc('nameLast')
// or
handler.applySort({ orderBy: 'nameFirst', direction: 'asc' })
handler.applySort({ orderBy: 'nameLast', direction: 'asc' })
// will sort items by nameLast and nameFirstIf i understood correctly you just need to reverse items in your |
|
.getSort only returns the last sorted column. |

Thx
Yes i meant the visual indicator 👍
I guess you expect last names to be sorted alphabetically. But if 2 people have the same, then the first names are sorted too, right?
Literally “sorting last names and first names”.
If you do it manually by clicking on the table, you must 1) click on
nameFirstcolumn, then 2) onnameLastto get this result.Same way for applySort.
If i understood correctly you just need to reverse items in your
sortItemsarray