From 94f8d139a1720d2693443e9b1e9dadaf18e50711 Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 7 Feb 2023 13:35:00 +0100 Subject: [PATCH] Fix experiments sidebar sorting [SCI-7894] --- app/controllers/projects_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 2a449de32..9d9372e2b 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -94,7 +94,8 @@ class ProjectsController < ApplicationController end def sidebar - @current_sort = @project.current_view_state(current_user).state.dig('experiments', params[:view_mode], 'sort') + @current_sort = params[:sort] || @project.current_view_state(current_user) + .state.dig('experiments', params[:view_mode], 'sort') render json: { html: render_to_string( partial: 'shared/sidebar/experiments', locals: {