Open edgararuiz opened 3 years ago
Reprex:
library(shiny) library(connectwidgets) library(dplyr) connect_server <- Sys.getenv("CONNECT_SERVER") connect_key <- Sys.getenv("CONNECT_API_KEY") client <- connect(server = connect_server, api_key = connect_key) all_content <- content(client) app_modes <- all_content %>% group_by(app_mode) %>% summarise() %>% pull() ui <- fluidPage( radioButtons("type", label = "Type", choices = app_modes), rscgridOutput("grid") ) server <- function(input, output, session) { output$grid <- renderRscgrid({ all_content %>% filter(app_mode == input$type) %>% head(10) %>% rsc_grid() }) } shinyApp(ui = ui, server = server)
Reprex: