Filter: Include "input" event for searches. See #1280

This commit is contained in:
Rob Garrison 2016-09-06 07:29:33 -05:00
parent 1710f5c25b
commit daa7cfa89c
2 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -831,9 +831,9 @@
// don't allow 'change' event to process if the input value is the same - fixes #685 // don't allow 'change' event to process if the input value is the same - fixes #685
if ( table.config.widgetOptions.filter_initialized && if ( table.config.widgetOptions.filter_initialized &&
( event.which === tskeyCodes.enter || event.type === 'search' || ( event.which === tskeyCodes.enter || event.type === 'search' ||
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) || ( event.type === 'change' || event.type === 'input' ) &&
// only "input" event fires in MS Edge when clicking the "x" to clear the search this.value !== c.lastSearch[column] )
( event.type === 'input' && this.value === '' ) ) { ) {
event.preventDefault(); event.preventDefault();
// init search with no delay // init search with no delay
$( this ).attr( 'data-lastSearchTime', new Date().getTime() ); $( this ).attr( 'data-lastSearchTime', new Date().getTime() );