mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Filter: ignore change event if input value hasn't changed. Fixes #685
This commit is contained in:
parent
c9c11a8495
commit
0782741fb8
@ -829,7 +829,9 @@ ts.filter = {
|
||||
ts.filter.searching( table, true, true );
|
||||
})
|
||||
.bind('search change keypress '.split(' ').join(c.namespace + 'filter '), function(event){
|
||||
if (event.which === 13 || event.type === 'search' || event.type === 'change') {
|
||||
var column = $(this).data('column');
|
||||
// don't allow "change" event to process if the input value is the same - fixes #685
|
||||
if (event.which === 13 || event.type === 'search' || event.type === 'change' && this.value !== c.lastSearch[column]) {
|
||||
event.preventDefault();
|
||||
// init search with no delay
|
||||
$(this).attr('data-lastSearchTime', new Date().getTime());
|
||||
|
Loading…
Reference in New Issue
Block a user