-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
I copied code from the tutorial into R and can't get the colVisibility filter to show up at all. I used this code to enable the extension:
library(shiny)
library(htmlwidgets)
library(D3TableFilter)
data(mtcars);
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,
# alphabetic sorting for the row names column, numeric for all other columns
col_types = c("string", rep("number", ncol(mtcars)))
);
extensions <- list(
list(name = "sort"),
list( name = "colsVisibility",
at_start = c(1,2,3,4,5),
text = 'Hide columns: ',
enable_tick_all = TRUE
),
list( name = "filtersVisibility",
visible_at_start = TRUE)
);
d3tf(mtcars,
tableProps = tableProps,
extensions = extensions,
edit = TRUE,
showRowNames = TRUE,
tableStyle = "table table-bordered");
})
})I do not get the "Display columns" column filter at the top right. The code also doesn't seem to hide the columns (1,2,3,4,5) at start.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels