From d3e11b0ddede0cf57a9f271465891713203e9d60 Mon Sep 17 00:00:00 2001 From: ajugo Date: Wed, 31 May 2023 09:38:09 +0200 Subject: [PATCH] Hide experiment action row after archive/restore [SCI-8576] (#5519) --- app/assets/javascripts/projects/show.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/projects/show.js b/app/assets/javascripts/projects/show.js index 01a79e9b0..5082cf909 100644 --- a/app/assets/javascripts/projects/show.js +++ b/app/assets/javascripts/projects/show.js @@ -17,8 +17,10 @@ let archivedOnToFilter; function updateExperimentsToolbar() { - window.actionToolbarComponent.fetchActions({ experiment_ids: selectedExperiments }); - window.actionToolbarComponent.setReloadCallback(refreshCurrentView); + if (window.actionToolbarComponent) { + window.actionToolbarComponent.fetchActions({ experiment_ids: selectedExperiments }); + window.actionToolbarComponent.setReloadCallback(refreshCurrentView); + } } function initProjectsViewModeSwitch() { @@ -105,6 +107,8 @@ updateExperimentsToolbar(); loadExperimentWorkflowImages(); + selectedExperiments.length = 0; + InfiniteScroll.init(cardsWrapper, { url: cardsUrl, eventTarget: window,