Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DT tables selected row highlight with updating css #409

Merged
merged 6 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading