Skip to content

paging_length doesn't work #29

@jwang-lilly

Description

@jwang-lilly

Hi, Great package.

For some reason, the paging_length doesn't work. Following is a minimal example. You can also use the example "performance" provided in the examples coming with the package.

library(shiny)
library(htmlwidgets)
library(D3TableFilter)

data(mtcars);

ui <- fluidPage(
title = 'Basic usage of D3TableFilter in Shiny',
fluidRow(
column(width = 12, d3tfOutput('mtcars', height = "auto"))
)
)

server <- shinyServer(function(input, output, session) {
output$mtcars <- renderD3tf({

# Define table properties. See http://tablefilter.free.fr/doc.php
# for a complete reference
tableProps <- list(
  btn_reset = TRUE,
  paging = TRUE,
  paging_length = 5,
  results_per_page = JS("['Rows per page', [5, 20]]"),
    # alphabetic sorting for the row names column, numeric for all other columns
    col_types = c("string", rep("number", ncol(mtcars)))
);

d3tf(mtcars,
     tableProps = tableProps,
     extensions = list(
      list(name = "sort")
     ),
     showRowNames = TRUE,
     tableStyle = "table table-bordered");

})
})

runApp(list(ui = ui, server = server))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions