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.

Sorting paginated results

See original GitHub issue

Hi,

Is it possible to sort all paginated results in front end or do we need to do this in the backend?

At the moment applying orderBy filter to the paginated list it only affects the visible page but not all results.

Example like this:

<div dir-paginate="item in filteredItems = (items | filter:search | filter:type:strict | itemsPerPage: 50 | orderBy:order) track by $index" on-start-render="ngRepeatStarted" on-finish-render="ngRepeatFinished" pagination-id="smallSize" data-items></div>

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
michaelbromleycommented, Aug 24, 2015

Hi,

make sure the itemsPerPagefilter is at the end of the expression. Then it should work.

0reactions
kanbaracommented, Sep 14, 2015

I would like to use `track by index’ with my set of filters. My code is something like:

  <tr dir-paginate="item in deliveryItems | 
                             orderBy:sortType:sortReverse | 
                             filter:searchDeliveryItems track by item.deliveryItemId |
                             itemsPerPage: 10">

This issue still persists for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pagination and Sorting using Spring Data JPA - Baeldung
Pagination is often helpful when we have a large dataset and we want to present it to the user in smaller chunks.
Read more >
Spring Boot Pagination and Sorting Example - HowToDoInJava
Pagination consists of two fields – page size and page number. Sorting is done on a single or multiple fields in the table....
Read more >
Issues with pagination and sorting - Stack Overflow
sorting the table will involve sorting rows in all pages, not just the current page. So do you have any more issues to...
Read more >
Spring Boot Pagination and Sorting example - BezKoder
Spring Data Sort and Order ... The Sort class provides sorting options for database queries with more flexibility in choosing single/multiple sort ......
Read more >
Pagination and Sorting using Spring Boot - Medium
For sorting as we have seen PagingAndSortingRepository have one findAll() method which will take Sort-Object in the argument. For sorting, we ...
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