summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-11-07 13:04:39 +0100
committerMorris Jobke <hey@morrisjobke.de>2016-11-14 16:21:57 +0100
commit1141fcc9ac1dfd80deeef66e82ee2c8968bdce4d (patch)
tree27d5a5fd315103825976bc0490652408590a106e /apps/files/js
parentcebb68992509215163f6776b76e48411a31a287e (diff)
downloadnextcloud-server-1141fcc9ac1dfd80deeef66e82ee2c8968bdce4d.tar.gz
nextcloud-server-1141fcc9ac1dfd80deeef66e82ee2c8968bdce4d.zip
Skip hidden files when counting visible files in list (#26522)
The file list UI logic that renders the next page doesn't properly exclude hidden files when not shown. This fix makes sure that only rows that are actually visible are counted when rendering a page, this makes sure that the page will always have enough elements displayed.
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/filelist.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index c53fa4f3d66..d32c3ba7c9e 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -923,7 +923,8 @@
tr,
fileData,
newTrs = [],
- isAllSelected = this.isAllSelected();
+ isAllSelected = this.isAllSelected(),
+ showHidden = this._filesConfig.get('showhidden');
if (index >= this.files.length) {
return false;
@@ -947,7 +948,10 @@
}
newTrs.push(tr);
index++;
- count--;
+ // only count visible rows
+ if (showHidden || !tr.hasClass('hidden-file')) {
+ count--;
+ }
}
// trigger event for newly added rows