Merge pull request #20156 from owncloud/files-filter-triger-once
dont trigger the scroll event of every single item we filter in the file list
This commit is contained in:
commit
3c01386a50
|
@ -2133,15 +2133,16 @@
|
||||||
this.hideIrrelevantUIWhenNoFilesMatch();
|
this.hideIrrelevantUIWhenNoFilesMatch();
|
||||||
}
|
}
|
||||||
var that = this;
|
var that = this;
|
||||||
|
filter = filter.toLowerCase();
|
||||||
this.$fileList.find('tr').each(function(i,e) {
|
this.$fileList.find('tr').each(function(i,e) {
|
||||||
var $e = $(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');
|
$e.addClass('hidden');
|
||||||
that.$container.trigger('scroll');
|
|
||||||
} else {
|
} else {
|
||||||
$e.removeClass('hidden');
|
$e.removeClass('hidden');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
that.$container.trigger('scroll');
|
||||||
},
|
},
|
||||||
hideIrrelevantUIWhenNoFilesMatch:function() {
|
hideIrrelevantUIWhenNoFilesMatch:function() {
|
||||||
if (this._filter && this.fileSummary.summary.totalDirs + this.fileSummary.summary.totalFiles === 0) {
|
if (this._filter && this.fileSummary.summary.totalDirs + this.fileSummary.summary.totalFiles === 0) {
|
||||||
|
|
Loading…
Reference in New Issue