mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 19:27:24 +01:00
presets: Improve performance
This commit is contained in:
parent
766ffa15cb
commit
69a8326fbc
1 changed files with 39 additions and 28 deletions
|
|
@ -18,35 +18,40 @@ preset_editor_ui <- function(id) {
|
||||||
"Customize" = "custom"
|
"Customize" = "custom"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
conditionalPanel(
|
tabsetPanel(
|
||||||
sprintf("input['%s'] == 'custom'", NS(id, "preset")),
|
id = NS(id, "customization"),
|
||||||
shinyWidgets::pickerInput(
|
type = "hidden",
|
||||||
inputId = NS(id, "species"),
|
tabPanelBody(value = "none"),
|
||||||
label = "Included species",
|
tabPanelBody(
|
||||||
choices = species_choices,
|
value = "custom",
|
||||||
selected = species_replicative,
|
shinyWidgets::pickerInput(
|
||||||
options = list(
|
inputId = NS(id, "species"),
|
||||||
"actions-box" = TRUE,
|
label = "Included species",
|
||||||
"live-search" = TRUE
|
choices = species_choices,
|
||||||
|
selected = species_replicative,
|
||||||
|
options = list(
|
||||||
|
"actions-box" = TRUE,
|
||||||
|
"live-search" = TRUE
|
||||||
|
),
|
||||||
|
multiple = TRUE
|
||||||
),
|
),
|
||||||
multiple = TRUE
|
shinyWidgets::pickerInput(
|
||||||
),
|
inputId = NS(id, "reference_genes"),
|
||||||
shinyWidgets::pickerInput(
|
label = "Reference genes",
|
||||||
inputId = NS(id, "reference_genes"),
|
choices = gene_choices,
|
||||||
label = "Reference genes",
|
selected = genes_tpe_old,
|
||||||
choices = gene_choices,
|
options = list(
|
||||||
selected = genes_tpe_old,
|
"actions-box" = TRUE,
|
||||||
options = list(
|
"live-search" = TRUE
|
||||||
"actions-box" = TRUE,
|
),
|
||||||
"live-search" = TRUE
|
multiple = TRUE
|
||||||
),
|
),
|
||||||
multiple = TRUE
|
actionButton(
|
||||||
),
|
NS(id, "apply_button"),
|
||||||
actionButton(
|
"Perform analysis",
|
||||||
NS(id, "apply_button"),
|
class = "btn-primary",
|
||||||
"Perform analysis",
|
style = "margin-top: 16px; margin-bottom: 16px"
|
||||||
class = "btn-primary",
|
)
|
||||||
style = "margin-top: 16px; margin-bottom: 16px"
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -62,11 +67,17 @@ preset_editor_server <- function(id) {
|
||||||
result <- reactiveVal(preset_replicative_species)
|
result <- reactiveVal(preset_replicative_species)
|
||||||
|
|
||||||
observeEvent(input$preset, {
|
observeEvent(input$preset, {
|
||||||
if (input$preset == "replicative") {
|
panel <- if (input$preset == "replicative") {
|
||||||
result(preset_replicative_species)
|
result(preset_replicative_species)
|
||||||
|
"none"
|
||||||
} else if (input$preset == "all") {
|
} else if (input$preset == "all") {
|
||||||
result(preset_all_species)
|
result(preset_all_species)
|
||||||
|
"none"
|
||||||
|
} else {
|
||||||
|
"custom"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateTabsetPanel(session, "customization", selected = panel)
|
||||||
})
|
})
|
||||||
|
|
||||||
observeEvent(input$apply_button, {
|
observeEvent(input$apply_button, {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue