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

broken examples - filter extension example not working properly #84

Closed
larryhengl opened this issue Mar 27, 2013 · 3 comments
Closed

broken examples - filter extension example not working properly #84

larryhengl opened this issue Mar 27, 2013 · 3 comments

Comments

@larryhengl
Copy link

If you page the paginator example grid forward until you see number=2086 title=Changelog... (page #4?), then issue a browser search filter of 'Changelog', then the grid becomes empty because it is still at page 4. But then paging backwards to the 1st page we see the row for number=2086, and a row for number=2406 which has 'changelog' in the body column, and then a bunch of other rows which do not appear to have 'changelog' in the title or body cols.

Issuing a serverside search filter = "Changelog", or any term, does not appear to do anything.

Tested in Chrome 24. Since paginator grid does not render in FF, could not test the filter extension example in FF.

@wyuenho
Copy link
Contributor

wyuenho commented Mar 27, 2013

The server side filter example does not search the body. It just issues a query with the parameter label=whatever_issue_label_backbone_has_defined. It just uses this Github API. It's a little confusing at the moment. Let me know if you have a better example that doesn't require me to fire up an actual server.

@wyuenho wyuenho closed this as completed Mar 27, 2013
@larryhengl
Copy link
Author

so correct me if i'm wrong, the server side filter simply passes the label param as a filter to the local model collection? or to the actual service backend that then fetches a new/reduced collection?

and the browser side filter does a text search in the DOM (table body), as opposed to an underscore filter on the collection?

@wyuenho
Copy link
Contributor

wyuenho commented Mar 27, 2013

ServerSideFilter: Just sends a query constructed from the search box to the server for the actual searching.
ClientSideFilter: Requires lunr.js to do fast full-text searching. It doesn't comb the DOM. As you can see from the example, you can define "fields", AKA your model attributes AKA your column data for indexing, and the ClientSideFilter/lunr.js only searches those fields. Underscore is not suitable for full-text searching so I didn't use it.

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

No branches or pull requests

2 participants