Improve species slider performance

This commit is contained in:
Elias Projahn 2021-11-02 15:07:04 +01:00
parent 69a8326fbc
commit 9709360d45
2 changed files with 13 additions and 8 deletions

View file

@ -10,14 +10,12 @@ js_link <- DT::JS("function(row, data) {
server <- function(input, output, session) {
preset <- preset_editor_server("preset_editor")
output$n_species_slider <- renderUI({
sliderInput(
observe({
species_count <- length(preset()$species_ids)
updateSliderInput(
session,
"n_species",
"Required number of species per gene",
min = 0,
max = length(preset()$species_ids),
step = 1,
value = 10
max = species_count
)
})