Commit 160b528b authored by Midoux Cedric's avatar Midoux Cedric

filter selectAll

parent 0a0a0742
......@@ -178,7 +178,8 @@ filterSample <- function() {
selected = "sample"
),
wellPanel(uiOutput("filterUI")),
wellPanel(uiOutput("filterUI"),
actionLink(inputId = "selectAll", label = "(Un)select All")),
footer = tagList(modalButton("Cancel"),
actionButton(inputId = "okData", label = "Refresh filter"),
......@@ -190,6 +191,7 @@ filterSample <- function() {
output$filterUI <- renderUI({
if (is.null(input$filterCriteria))
return()
if (input$filterCriteria == "sample") {
label <- "Sample to keep :"
choices <- sample_names(physeq())
......@@ -197,6 +199,26 @@ output$filterUI <- renderUI({
label <- "Variable to keep :"
choices <- levels(get_variable(physeq(), input$filterCriteria))
}
observe({
if(input$selectAll == 0) return(NULL)
else if (input$selectAll%%2 == 0)
{
updateCheckboxGroupInput(session = session,
inputId = "filterCheck",
label = label,
choices = choices,
selected = choices,
inline = TRUE)
} else {
updateCheckboxGroupInput(session = session,
inputId = "filterCheck",
label = label,
choices = choices,
inline = TRUE)
}
})
checkboxGroupInput(inputId = "filterCheck",
label = label,
choices = choices,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment