leikind / wice_grid

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

Broken Filters - query params concatenate if you filter again #332

Open golddiga opened 7 years ago

golddiga commented 7 years ago

Im facing an issue that if I filter and then change the filter the query params concatenate infinitely

Filter by Status = Active http://localhost:3001/users?grid%5Bf%5D%5Bstatus%5D%5B%5D=active

Change Filter to Status = Inactive http://localhost:3001/users?grid%5Bf%5D%5Bstatus%5D%5B%5D=active&grid%5Bf%5D%5Bstatus%5D%5B%5D=inactive

BTW Dropdown filters are not submitting anymore if you select a value. You have to click the Filter button or hit enter in another filter field.

using version v3.2.0.pre4

afdev82 commented 7 years ago

I'm using the version 3.6.3 with rails 4.2.8 and I think I found the problem in this commit: https://github.com/leikind/wice_grid/pull/324/commits/74ef1e7dec2e0da8dfce97d15f62080f33a3a41c If I revert the changes I don't have this issue anymore