dont trigger the scroll event of every single item we filter in the file list

This commit is contained in:
Robin Appelman 2015-10-29 16:30:56 +01:00
parent 530f7229e7
commit 860e31a333
1 changed files with 3 additions and 2 deletions

View File

@ -2117,15 +2117,16 @@
this.hideIrrelevantUIWhenNoFilesMatch();
}
var that = this;
filter = filter.toLowerCase();
this.$fileList.find('tr').each(function(i,e) {
var $e = $(e);
if ($e.data('file').toString().toLowerCase().indexOf(filter.toLowerCase()) === -1) {
if ($e.data('file').toString().toLowerCase().indexOf(filter) === -1) {
$e.addClass('hidden');
that.$container.trigger('scroll');
} else {
$e.removeClass('hidden');
}
});
that.$container.trigger('scroll');
},
hideIrrelevantUIWhenNoFilesMatch:function() {
if (this._filter && this.fileSummary.summary.totalDirs + this.fileSummary.summary.totalFiles === 0) {