diff --git a/DESCRIPTION b/DESCRIPTION index 2bcf58b5..b24b7272 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: shiny.semantic Title: Semantic UI Support for Shiny -Version: 0.5.0.9001 +Version: 0.5.0.9002 Authors@R: c(person("Filip", "Stachura", email = "filip@appsilon.com", role = "aut"), person("Dominik", "Krzeminski", role = "aut"), person("Krystian", "Igras", role = "aut"), diff --git a/NEWS.md b/NEWS.md index 8594eb80..e1f7ee16 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,8 @@ - Fixed `update_multiple_checkbox` not supporting choices with single quote. +- `semantic_DT` now accepts style and class arguments. + # [shiny.semantic 0.5.0](https://github.com/Appsilon/shiny.semantic/releases/tag/0.5.0) - `shiny.semantic` no longer uses CDN as the default source of assets. Instead, `semantic.assets` package was introduced. diff --git a/R/tables.R b/R/tables.R index 5b5a8084..327803bf 100644 --- a/R/tables.R +++ b/R/tables.R @@ -24,11 +24,14 @@ #' } #' #' @export -semantic_DT <- function(..., options = list(), style="semanticui", class = 'ui small compact table') { - DT::datatable(..., options = options, - class = class, - style = style, - rownames = FALSE) +semantic_DT <- function(..., options = list(), style = "semanticui", class = 'ui small compact table') { + DT::datatable( + ..., + options = options, + class = class, + style = style, + rownames = FALSE + ) } #' Semantic DT Output @@ -38,5 +41,5 @@ semantic_DT <- function(..., options = list(), style="semanticui", class = 'ui s #' @return DT Output with semanitc style #' @export semantic_DTOutput <- function(...) { - DT::DTOutput(...) + DT::DTOutput(...) } diff --git a/man/semantic_DT.Rd b/man/semantic_DT.Rd index b6f6b2d2..59fc8f35 100644 --- a/man/semantic_DT.Rd +++ b/man/semantic_DT.Rd @@ -4,12 +4,21 @@ \alias{semantic_DT} \title{Create Semantic DT Table} \usage{ -semantic_DT(..., options = list()) +semantic_DT( + ..., + options = list(), + style = "semanticui", + class = "ui small compact table" +) } \arguments{ \item{...}{datatable parameters, check \code{?DT::datatable} to learn more.} \item{options}{datatable options, check \code{?DT::datatable} to learn more.} + +\item{style}{datatable style, check \code{?DT::datatable} to learn more.} + +\item{class}{datatable class, check \code{?DT::datatable} to learn more.} } \description{ This creates DT table styled with Semantic UI.