Fix dashboard infinite scroll [SCI-5462]

This commit is contained in:
aignatov-bio 2021-02-18 15:31:31 +01:00
parent bb93df004a
commit 0609e9699d

View file

@ -10,7 +10,7 @@ var DasboardCurrentTasksWidget = (function() {
function appendTasksList(json, container) {
$.each(json.data, (i, task) => {
var currentTaskItem = task;
$(container).append(currentTaskItem);
$(container).find('.current-tasks-list').append(currentTaskItem);
});
}
@ -48,7 +48,7 @@ var DasboardCurrentTasksWidget = (function() {
}
function initInfiniteScroll() {
InfiniteScroll.init('.current-tasks-list', {
InfiniteScroll.init('.current-tasks-list-wrapper', {
url: $('.current-tasks-list').data('tasksListUrl'),
customResponse: (json, container) => {
appendTasksList(json, container);
@ -136,7 +136,7 @@ var DasboardCurrentTasksWidget = (function() {
}
appendTasksList(result, $currentTasksList);
PerfectSb().update_all();
if (newList) InfiniteScroll.resetScroll('.current-tasks-list');
if (newList) InfiniteScroll.resetScroll('.current-tasks-list-wrapper');
animateSpinner($currentTasksList, false);
}).error(function(error) {
// If error is 403, it is possible that the user was removed from project/experiment,