gt
gt copied to clipboard
Add support for {crosstalk}
The {crosstalk} package allows different shiny widgets on a page to interact with each other. Since gt is gaining popularity fast, it would be great to have crosstlak support for it. The following is an example that should work once crosstalk is supported:
library(shiny)
df <- crosstalk::SharedData$new(cars)
ui <- fluidPage(
crosstalk::filter_slider("speed", NULL, df, "speed"),
d3scatter::d3scatterOutput("plot"),
gt::gt_output("table")
)
server <- function(input, output, session) {
output$plot <- d3scatter::renderD3scatter({
d3scatter::d3scatter(df, ~speed, ~dist)
})
output$table <- gt::render_gt({
df
})
}
shinyApp(ui, server)
I do see that it was also requested here https://github.com/rstudio/gt/discussions/960
any update on this feature?