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

[Feature Request] Filtering support #20

Closed
stnor opened this issue Dec 17, 2012 · 12 comments
Closed

[Feature Request] Filtering support #20

stnor opened this issue Dec 17, 2012 · 12 comments
Milestone

Comments

@stnor
Copy link

stnor commented Dec 17, 2012

Fantastic work! Thanks for sharing.

It would be great if there was filtering support, so that one should type text in an input box and filter the rows based on the input. I personally would prefer a "global" filter and not per column.

Would that be something that you could consider?

@wyuenho
Copy link
Contributor

wyuenho commented Dec 17, 2012

Hi! Thx and congrat for being the first person to open a ticket besides myself!

Yes I suppose I will need a filter widget at some point. Will be an extension for sure and it'll be able to listen directly to the collection events and tell the filtered rows to disappear. You will probably be able to attach as many of them on each grid as you want. Right?

But I'm going to shelf this for the next version. I've been working on this first version long enough I really need to get a release out. BTW, if you have a clone, I plan to do some major refactoring for Backbone 0.9.9 and then some major squashing on master... don't say I didn't tell you :)

@stnor
Copy link
Author

stnor commented Dec 17, 2012

Yeah, sounds good.
Keep up the good work!

/Stefan

@ghost ghost assigned wyuenho Jan 24, 2013
@jayelkaake
Copy link

+1 to this. Looks great, but a filtering system would make it awesome.

@wyuenho
Copy link
Contributor

wyuenho commented Jan 26, 2013

I've started working on this. Any concreate ideas what you guys want with this? Will a naive prefix search on predefined fields good enough? Search on the server and rerender afterwards? Any awesome algorithm dudes out there that can help me implement a Levenshtein distance search box purely on the client-side?

@ihortymoshenko
Copy link

First of all, I think need to do search on the server and rerender afterwards. For this issue also need some specifications about data that will be send to the server. For instance, http://www.trirand.com/jqgridwiki/doku.php?id=wiki:advanced_searching#options. I also think about writing the bundle for Symfony2 to realize the search on the server. For instance, using by Doctrine2 and QueryBuilder and maybe some logic to easy configurate grids from the server-side.

@jayelkaake
Copy link

I agree with @IgorTimoshenko with using the jqgrid filters spec for sending server-side filter requests. Just make sure the UI is as simple as possible. Something like a collapsible filter box for each field would be good enough, and maybe the ability to add a fulltext search on the data (that would hit the server too). The jqgrid filters are too complicated.

In terms of client-side architecture you would want to create a Filter class and that decorates the grid with the filters (ie Decorator design pattern).

Thanks!!

@wyuenho
Copy link
Contributor

wyuenho commented Jan 27, 2013

Ok. I think for the first version of a filter I'll do the following:

  1. Separate search box with no connection to the grid, no excel style filter. The only connection the filter has with the grid is they are sharing the same collection.
  2. There will be a well-defined way to turn the stuff inside the search box to queries sent to the server.
  3. No client-side filtering.

Things that you guys can help me decide:

  1. Which query engine to use? There are a number of query engines/plugins for Backbone out there.
  2. Yes or no for autocomplete? Probably leverage bootstrap-typeahead?

@ihortymoshenko
Copy link

I am not sure that autocomplete needed for the first version.

@jayelkaake
Copy link

I agree with @IgorTimoshenko

@Integral
Copy link

Hi! Any update here?

@phillycoder
Copy link

+1, I like the idea of keeping the Search box separate from grid. Will this search queryParams be used along with BackGrid queryParams?

wyuenho added a commit that referenced this issue Mar 22, 2013
@wyuenho
Copy link
Contributor

wyuenho commented Mar 22, 2013

Hi guys, ServerSideFilter and ClientSideFilter are now in the branch. ServerSideFilter performs your boring send-a-request-to-the-server type of searching. ClientSideFilter integrates with lunrjs to do client-side full-text searching. It's more suitable for a grid with a small number of records.

Please try them out and let me know if there are any problems.

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

No branches or pull requests

6 participants