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

Revealing filterable doesn't show any matches if all items match. #7307

Shepard opened this Issue Apr 10, 2014 · 0 comments


None yet
2 participants

Shepard commented Apr 10, 2014

If you have a filterable with data-filter-reveal="true" and perform a search that matches all items, none are shown instead of all.

See my test page:
Enter "test" into the text field.
This should show all three items "Test 1", "Test 2" and "Test 3". Instead it shows none of them. If however you type "test 1" it shows "Test 1".

This appears to be caused by the logic in _filterItems in the fitlerable widget, in particular this code:

        // If nothing is hidden, then the decision whether to hide or show the items
        // is based on the "filterReveal" option.
        if ( hide.length === 0 ) {
            filterItems[ opts.filterReveal ? "addClass" : "removeClass" ]( "ui-screen-hidden" );
        } else {
            $( hide ).addClass( "ui-screen-hidden" );
            $( show ).removeClass( "ui-screen-hidden" );

I guess this needs a cleverer check.

Browser: Firefox 28 on Desktop (Windows 7).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment