Would love the checkboxGroupInput
to (optionally) have a select all/select none box associated with the group.
I think you can achieve this by updateCheckboxGroupInput()
. An example:
myChoices <- letters[1:5]
runApp(list(
ui = basicPage(
checkboxGroupInput('foo', 'FOO', myChoices),
checkboxInput('bar', 'All/None')
),
server = function(input, output, session) {
observe({
updateCheckboxGroupInput(
session, 'foo', choices = myChoices,
selected = if (input$bar) myChoices
)
})
}
))
I love this! An elegant solution!
Could it be relevant to reopen that suggestion?
When using shiny
with flexdashboard
, it would be easier for basic users to have a simple option directly within checkboxGroupInput ()
.
Best regards
Most helpful comment
I think you can achieve this by
updateCheckboxGroupInput()
. An example: