Skip to content

Commit

Permalink
Filter: attempt to fix #1152
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed May 23, 2017
1 parent 30ee40c commit 0a18019
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/widgets/widget-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -816,9 +816,6 @@
if ( event.which === tskeyCodes.escape ) {
// make sure to restore the last value on escape
this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column];
// live search
} else if ( liveSearch === false ) {
return;
// don't return if the search value is empty ( all rows need to be revealed )
} else if ( this.value !== '' && (
// liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
Expand All @@ -827,6 +824,11 @@
( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace &&
( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) {
return;
// live search
} else if ( liveSearch === false ) {
if ( this.value !== '' && event.which !== tskeyCodes.enter ) {
return;
}
}
// change event = no delay; last true flag tells getFilters to skip newest timed input
tsf.searching( table, true, true, column );
Expand Down

0 comments on commit 0a18019

Please sign in to comment.