From 2ced93aa94701b18e7e9a1e820ce38eb341deded Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Tue, 25 Jan 2022 16:27:18 +0100 Subject: [PATCH] Switch to the results page when the preset changes --- R/server.R | 8 ++++++++ R/ui.R | 1 + 2 files changed, 9 insertions(+) diff --git a/R/server.R b/R/server.R index 60ec565..39fb3a6 100644 --- a/R/server.R +++ b/R/server.R @@ -12,6 +12,14 @@ server <- function(input, output, session) { preset <- input_reactives$preset comparison_gene_ids <- input_reactives$comparison_gene_ids + observe({ + updateNavbarPage( + session, + "main_page", + selected = "Results" + ) + }) |> bindEvent(preset(), ignoreInit = TRUE) + # Compute the results according to the preset. analysis <- reactive({ preset <- preset() diff --git a/R/ui.R b/R/ui.R index d80e34b..b0fac40 100644 --- a/R/ui.R +++ b/R/ui.R @@ -2,6 +2,7 @@ ui <- div( shinyjs::useShinyjs(), rclipboard::rclipboardSetup(), navbarPage( + id = "main_page", theme = bslib::bs_theme( version = 5, bootswatch = "united",