Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paging breaks on new search #30

Open
onepablo opened this issue May 15, 2013 · 0 comments
Open

Paging breaks on new search #30

onepablo opened this issue May 15, 2013 · 0 comments

Comments

@onepablo
Copy link

I have 1,000 results, and am on page 10 of said results. The pager says "page 91-100 of 1000".

If I then type in "cat", the paging says "page 91 - 5 of 5", displaying no results obviously.

I've quickly hacked this...:

    // update the options with the latest q value
    if ( options.searchbox_class.length == 0 ) {
        options.q = $('.facetview_freetext', obj).val();

... so the paging gets set to 0 before the new search is run

    // update the options with the latest q value
    if ( options.searchbox_class.length == 0 ) {
        options.paging.from = (options.q != $('.facetview_freetext', obj).val()) ? 0 : options.paging.from;
        options.q = $('.facetview_freetext', obj).val();

I'm sure you have a much more elegant solution though!!

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

No branches or pull requests

1 participant