mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 19:27:24 +01:00
Improve species slider performance
This commit is contained in:
parent
69a8326fbc
commit
9709360d45
2 changed files with 13 additions and 8 deletions
12
R/server.R
12
R/server.R
|
|
@ -10,14 +10,12 @@ js_link <- DT::JS("function(row, data) {
|
||||||
server <- function(input, output, session) {
|
server <- function(input, output, session) {
|
||||||
preset <- preset_editor_server("preset_editor")
|
preset <- preset_editor_server("preset_editor")
|
||||||
|
|
||||||
output$n_species_slider <- renderUI({
|
observe({
|
||||||
sliderInput(
|
species_count <- length(preset()$species_ids)
|
||||||
|
updateSliderInput(
|
||||||
|
session,
|
||||||
"n_species",
|
"n_species",
|
||||||
"Required number of species per gene",
|
max = species_count
|
||||||
min = 0,
|
|
||||||
max = length(preset()$species_ids),
|
|
||||||
step = 1,
|
|
||||||
value = 10
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
9
R/ui.R
9
R/ui.R
|
|
@ -6,7 +6,14 @@ ui <- fluidPage(
|
||||||
sidebarPanel(
|
sidebarPanel(
|
||||||
width = 3,
|
width = 3,
|
||||||
preset_editor_ui("preset_editor"),
|
preset_editor_ui("preset_editor"),
|
||||||
uiOutput("n_species_slider"),
|
sliderInput(
|
||||||
|
"n_species",
|
||||||
|
"Required number of species per gene",
|
||||||
|
min = 0,
|
||||||
|
max = 18,
|
||||||
|
step = 1,
|
||||||
|
value = 10
|
||||||
|
),
|
||||||
filters_ui("filters"),
|
filters_ui("filters"),
|
||||||
methods_ui("methods")
|
methods_ui("methods")
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue