Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.

Paging after filtering with the ClientSideFilter will reset the whole collection #194

Closed
wyuenho opened this issue May 18, 2013 · 6 comments
Labels

Comments

@wyuenho
Copy link
Contributor

wyuenho commented May 18, 2013

Steps to reproduce:

  1. Filter for something with more than 1 page of results
  2. Page to next page
  3. Clear the filter

The whole collection is now the last filtered results. The expected result should be the original result set.

@carlygeehr
Copy link

First of all, thank you for this awesome grid!

Was just wondering when you think you'll have a fix for this issue - or if you have any ideas for workarounds in the meantime. I've been trying to figure something out but don't really want to sink any more time into it. I'd be ok (for now) with just displaying an error when it gets into an error state.

This error is also happening for me with sorting:

  1. apply a filter to the grid
  2. sort a column
  3. remove the filter
    result: collection is stuck in the filtered state

Again, thank you so much!!

@wyuenho
Copy link
Contributor Author

wyuenho commented May 25, 2013

Ah I had a really busy week, but expect this to be fixed this weekend!

@carlygeehr
Copy link

Awesome! Looking forward to it :)

@wyuenho
Copy link
Contributor Author

wyuenho commented Jun 5, 2013

https://github.com/wyuenho/backgrid/tree/filter-paginator-fix

Everything should work as expected. There are some changes to Paginator#controls (changed format from fastForwardHandlerLabels), All the filter types will now accept the pageable collection directly without giving it collection.fullCollection. The client filters won't listen to change events from the search box anymore and the keyup event is changed to keydown.

Let me know if it doesn't work for any reason. I'll finish up the tests in a little bit.

@carlygeehr
Copy link

Looks like the paging after filtering issue is fixed in the new branch, but the (related) filter > sort > remove filter issue is still a problem. @wyuenho - Would you like that to be in a separate issue?

wyuenho added a commit that referenced this issue Jun 6, 2013
@carlygeehr
Copy link

It works!! Hooray :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants