Search/filter break when I use pagination

I have a normal table with members and a search field at the top. Search works fine when I search before clicking on any of the pagination links at the bottom.

When I click on for instance page 5, the search does not work anymore.

Is this normal behaviour?

Page opened:

Filter on first page:

Filter after clicking page 4 for instance:

does it have something to do with the offset then excluding records?

http://localhost:8100/members?offset=675

Well maybe you want to reset the pagination/offset when you run your search. The pagination stays on page 5 but there are no that many records, so you don’t see any results.

1 Like

Thanks, seems to be a fair solution. I have set the offset to reset when user focuses on search input field.

In terms of usability it is a bit weird for the user if the records reset to page 1, but it can work for now.

Maybe change that to use the on input dynamic event instead, not on focus, and maybe add some slight debounce of 100/200 milliseconds :slight_smile:

1 Like

@pixlapps Just on a bit of a side note, we’ve just implemented this infinite scroll component on our tables and it works perfectly, we’re planning on getting rid of all pagination to create a more seamless experience for our users (especially mobile/PWA) .

Not sure if its any good for you but worth a look:

1 Like