Skip to content

Commit

Permalink
Merge pull request #409 from Appsilon/esra-selected-rows-are-not-high…
Browse files Browse the repository at this point in the history
…lghted

Fix DT tables selected row highlight with updating css
  • Loading branch information
jakubnowicki authored Feb 28, 2024
2 parents a07cc1c + a4b26ae commit 0d923f9
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]", role = "aut"),
person("Dominik", "Krzeminski", role = "aut"),
person("Krystian", "Igras", role = "aut"),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
17 changes: 11 additions & 6 deletions R/tables.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#'
#' @param ... datatable parameters, check \code{?DT::datatable} to learn more.
#' @param options datatable options, check \code{?DT::datatable} to learn more.
#' @param style datatable style, check \code{?DT::datatable} to learn more.
#' @param class datatable class, check \code{?DT::datatable} to learn more.
#'
#' @examples
#' if (interactive()){
Expand All @@ -22,11 +24,14 @@
#' }
#'
#' @export
semantic_DT <- function(..., options = list()) {
DT::datatable(..., options = options,
class = 'ui small compact table',
style = "semanticui",
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
Expand All @@ -36,5 +41,5 @@ semantic_DT <- function(..., options = list()) {
#' @return DT Output with semanitc style
#' @export
semantic_DTOutput <- function(...) {
DT::DTOutput(...)
DT::DTOutput(...)
}
3 changes: 3 additions & 0 deletions inst/www/shiny-semantic-DT.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
-webkit-transition: color .1s ease,border-color .1s ease;
transition: color .1s ease,border-color .1s ease;
}
table.dataTable tr.selected td, table.dataTable td.selected {
background-color: #95d8f5;
}
11 changes: 10 additions & 1 deletion man/semantic_DT.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0d923f9

Please sign in to comment.