Permalink
Browse files

Filterable: When all items match the filter string, show them

Fixes gh-7307
  • Loading branch information...
gabrielschulhof committed Apr 10, 2014
1 parent 0bf1309 commit f2ca4b73d813f9feb40e87025e6e1bab70a9f7f6
Showing with 2 additions and 1 deletion.
  1. +2 −1 js/widgets/filterable.js
View
@@ -112,7 +112,8 @@ $.widget( "mobile.filterable", {
// 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" );
filterItems[ ( opts.filterReveal && val.length === 0 ) ?
"addClass" : "removeClass" ]( "ui-screen-hidden" );
} else {
$( hide ).addClass( "ui-screen-hidden" );
$( show ).removeClass( "ui-screen-hidden" );

0 comments on commit f2ca4b7

Please sign in to comment.