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

filter selectAll

parent 0a0a0742
...@@ -178,7 +178,8 @@ filterSample <- function() { ...@@ -178,7 +178,8 @@ filterSample <- function() {
selected = "sample" selected = "sample"
), ),
wellPanel(uiOutput("filterUI")), wellPanel(uiOutput("filterUI"),
actionLink(inputId = "selectAll", label = "(Un)select All")),
footer = tagList(modalButton("Cancel"), footer = tagList(modalButton("Cancel"),
actionButton(inputId = "okData", label = "Refresh filter"), actionButton(inputId = "okData", label = "Refresh filter"),
...@@ -190,6 +191,7 @@ filterSample <- function() { ...@@ -190,6 +191,7 @@ filterSample <- function() {
output$filterUI <- renderUI({ output$filterUI <- renderUI({
if (is.null(input$filterCriteria)) if (is.null(input$filterCriteria))
return() return()
if (input$filterCriteria == "sample") { if (input$filterCriteria == "sample") {
label <- "Sample to keep :" label <- "Sample to keep :"
choices <- sample_names(physeq()) choices <- sample_names(physeq())
...@@ -197,6 +199,26 @@ output$filterUI <- renderUI({ ...@@ -197,6 +199,26 @@ output$filterUI <- renderUI({
label <- "Variable to keep :" label <- "Variable to keep :"
choices <- levels(get_variable(physeq(), input$filterCriteria)) 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", checkboxGroupInput(inputId = "filterCheck",
label = label, label = label,
choices = choices, 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