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.

dir-paginate load all data before filtering itemPerPage

See original GitHub issue

Hi guys

I’m developing an angular app that loads my list of users in a table. As quantity of users is big, I need use pagination. But there is one problem:

When I click on next page button (for example num#2) , first, table shows all users (all data load), then (itemPerPage) filter apply.

<tr dir-paginate=" x in user | filter : searchFunction | itemsPerPage : 15">
<td>{{x.id}} </td>
</tr>
<dir-pagination-controls max-size="15" direction-links="true" boundary-links="true" >
</dir-pagination-controls> 

Any suggestion will be appreciated …

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
FarshadKazemicommented, May 30, 2016

Hi again dear Michael , thank you so much for your answer. I finally solve this issue. The problem was in one of my CSS files. I’ve used below code for animating hover effect :

.table > tbody > tr { background: #242425; transition: background 0.5s }
.table > tbody > tr:hover { background: #e5e5e5 }

It takes 0.5s for animation of each row and when I change page, it causes some delay.

👍 👍

0reactions
michaelbromleycommented, May 30, 2016

Glad you got it sorted, thanks for sharing the details of the cause.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AngularJS dirPaginate Only Filtering current page
It only sorts the current page of Data, if i use the pagination and click page 2 it will then only filter page...
Read more >
Search Sort and Pagination in ng-repeat - AngularJS
This directive will replace the ng-repeat directive in our code. And we will add the itemsPerPage filter which is provided by this library....
Read more >
How to Filtering, Sorting, and Paging in Angular JS?
The itemsPerPage should be applied after all other filters. And, then add the following code right after your grid.
Read more >
Angular Material Data Table - Paging, Sorting and Filter ...
Angular Material Data Table - Paging, Sorting, FilteringContent discussed : - render angular material table from a list- display processing ...
Read more >
Pagination Js Example - Bar Sereno
Pagination Js ExampleBCD tables only load in the browser with JavaScript enabled. js ... React components for sorting, filtering and pagination of data....
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