Fix experiments sidebar sorting [SCI-7894]

This commit is contained in:
Anton 2023-02-07 13:35:00 +01:00
parent 6e570dcc9d
commit 94f8d139a1

View file

@ -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: {