Skip to contents

Basic Usage

pagination

aggrid(iris,pagination = TRUE)

select rows with checkbox

aggrid(iris,checkboxSelection = TRUE)

Server

For big data, e.g. millions of rows,you should use server model.

purrr::map_dfr(seq_len(10000), ~iris) |> 
    aggrid()

Although the above code can be used to render within 5~6s, operations such as sorting become slowly.server model only work in shiny.

library(shiny)

ui <- fluidPage(
  aggridOutput("test")
)

server <- function(input, output, session) {
  output$test <- renderAggrid({
    purrr::map_dfr(seq_len(10000), ~iris) |> 
      aggrid(server = T)
  })
  observe({
    print(input$test_rows_selected)
  })
}

shinyApp(ui, server)