diff options
author | Martin Wortschack <mwortschack@gitlab.com> | 2018-10-24 06:25:46 +0000 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-10-24 06:25:46 +0000 |
commit | 97bbf0df8e7f414fbf3a39887fcccbc051fcbea8 (patch) | |
tree | e63652ff285d2d362bac4ca17496606972f56d5e /app/assets/javascripts/pager.js | |
parent | 22ab1a82ff9b6d0fda64df0d6b633fd588dd965e (diff) | |
download | gitlab-ce-97bbf0df8e7f414fbf3a39887fcccbc051fcbea8.tar.gz |
Resolve "Endless scroll loader is visible on user profile overview page"
Diffstat (limited to 'app/assets/javascripts/pager.js')
-rw-r--r-- | app/assets/javascripts/pager.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/app/assets/javascripts/pager.js b/app/assets/javascripts/pager.js index 3b58c54b3f4..386a9b2c740 100644 --- a/app/assets/javascripts/pager.js +++ b/app/assets/javascripts/pager.js @@ -7,14 +7,21 @@ const ENDLESS_SCROLL_BOTTOM_PX = 400; const ENDLESS_SCROLL_FIRE_DELAY_MS = 1000; export default { - init(limit = 0, preload = false, disable = false, prepareData = $.noop, callback = $.noop) { + init( + limit = 0, + preload = false, + disable = false, + prepareData = $.noop, + callback = $.noop, + container = '', + ) { this.url = $('.content_list').data('href') || removeParams(['limit', 'offset']); this.limit = limit; this.offset = parseInt(getParameterByName('offset'), 10) || this.limit; this.disable = disable; this.prepareData = prepareData; this.callback = callback; - this.loading = $('.loading').first(); + this.loading = $(`${container} .loading`).first(); if (preload) { this.offset = 0; this.getOld(); |