Integration with Shiny
RagGrid in Shiny
Here’s an example of RagGrid in shiny.Use the functions RagGridOutput()
and renderRagGrid()
.
ui.R
library(shiny)
shinyUI(fluidPage(
title = 'Use the RagGrid package in shiny',
h1('A Table Using aggrid'),
fluidRow(
column(2),
column(8, RagGrid::RagGridOutput('tbl1')),
column(2)
)
))
server.R
library(shiny)
library(RagGrid)
shinyServer(function(input, output, session) {
output$tbl1 <- renderRagGrid(
aggrid(iris)
)
})
The example is also included in the /examples folder. You can run this using
shiny::runApp('inst/examples/aggrid-shiny')