Created
October 16, 2019 21:04
-
-
Save lrasmus/f0eee2550faa02cc9733731c30971af4 to your computer and use it in GitHub Desktop.
Test DT regex highlighting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
devtools::install_github('lrasmus/DT', ref="423_highlight_regex") | |
library(shiny) | |
library(devtools) | |
library(DT) | |
ui <- fluidPage(fluidRow(column(12, DT::dataTableOutput("test")))) | |
server <- function(input, output) { | |
mtcars$model = rownames(mtcars) | |
rownames(mtcars) = NULL | |
output$test <- renderDataTable({ | |
datatable(mtcars, options = list( | |
searchHighlight = TRUE, | |
search = list(regex = TRUE) | |
#search = list(regex = FALSE) | |
)) | |
}) | |
} | |
shinyApp(ui = ui, server = server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment