Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit f2ca4b7

Browse files
author
Gabriel Schulhof
committed
Filterable: When all items match the filter string, show them
Fixes gh-7307
1 parent 0bf1309 commit f2ca4b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

js/widgets/filterable.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ $.widget( "mobile.filterable", {
112112
// If nothing is hidden, then the decision whether to hide or show the items
113113
// is based on the "filterReveal" option.
114114
if ( hide.length === 0 ) {
115-
filterItems[ opts.filterReveal ? "addClass" : "removeClass" ]( "ui-screen-hidden" );
115+
filterItems[ ( opts.filterReveal && val.length === 0 ) ?
116+
"addClass" : "removeClass" ]( "ui-screen-hidden" );
116117
} else {
117118
$( hide ).addClass( "ui-screen-hidden" );
118119
$( show ).removeClass( "ui-screen-hidden" );

0 commit comments

Comments
 (0)