leikind / wice_grid

A Rails grid plugin to create grids with sorting, pagination, and (automatically generated) filters
MIT License
537 stars 215 forks source link

Initial condition being used for every query? #145

Closed sridharraman closed 9 years ago

sridharraman commented 10 years ago

I thought the purpose of the conditions clause inside the initialize_grid was to set the initial filter. But it looks like every subsequent filter query that is made is done on the set of data that was filtered initially.

Is this expected behaviour?

If yes, what should I do if this what I want? -> Initial condition for showing the initial set of data -> Filters queried on later need to be done on the entire data set

I hope my question is clear.

leikind commented 10 years ago

Yes, this is the expected behavior.

If you need to render a page with a filter already active, have a look at the URL of the page with this filter set up manually, and then add the required parameters to your URL helper.

sridharraman commented 10 years ago

Okay, got it. Thanks.