Skip to content

Commit

Permalink
Table column width adjustments.
Browse files Browse the repository at this point in the history
  • Loading branch information
janlisec committed Jan 4, 2024
1 parent 39917f1 commit 16f2884
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/fnc_styleTabC3.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ styleTabC3 <- function(x, apm = NULL, selected_row = 1) {
options = list(
dom = "t", paging = FALSE, scrollX = TRUE, ordering = FALSE,
columnDefs = list(
list("width"= paste0(max(c(60, nchar(as.character(x[,"analyte"]))*5)), "px"), "targets" = which(colnames(x) %in% c("analyte"))-1),
list("width"= paste0(max(c(60, nchar(as.character(x[,"analyte"]))*9)), "px"), "targets" = which(colnames(x) %in% c("analyte"))-1),
list("width"= "80px", "targets" = which(!(colnames(x) %in% c("analyte","n","k","unit")))-1),
list("width"= "30px", "targets" = which(colnames(x) %in% c("n","k"))-1)
)
Expand Down
2 changes: 1 addition & 1 deletion R/fnc_styleTabH1.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ styleTabH1 <- function(x, mt = NULL, prec = NULL, output = c("df", "dt")[1], cr
options = list(
dom = "t", paging = FALSE, searching = FALSE, ordering = FALSE,
columnDefs = list(
list("width"= paste0(max(c(60, nchar(as.character(x[,"analyte"]))*5)), "px"), "targets" = which(colnames(x) %in% c("analyte"))-1),
list("width"= paste0(max(c(60, nchar(as.character(x[,"analyte"]))*9)), "px"), "targets" = which(colnames(x) %in% c("analyte"))-1),
list("width"= "60px", "targets" = which(!(colnames(x) %in% c("analyte", " ", "n", "N")))-1),
list("width"= "30px", "targets" = which(colnames(x) %in% c("n", "N"))-1),
list(visible = FALSE, targets = inv_cols),
Expand Down
2 changes: 1 addition & 1 deletion R/fnc_styleTabS1.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ styleTabS1 <- function(x, mt = NULL, sr = 1) {
options = list(
dom = "t", paging = FALSE, searching = FALSE, ordering = FALSE,
columnDefs = list(
list("width"= paste0(max(c(60, nchar(as.character(x[,"analyte"]))*5)), "px"), "targets" = which(colnames(x) %in% c("analyte"))-1),
list("width"= paste0(max(c(60, nchar(as.character(x[,"analyte"]))*9)), "px"), "targets" = which(colnames(x) %in% c("analyte"))-1),
list("width"= "60px", "targets" = which(!(colnames(x) %in% c("analyte", " ")))-1),
#list("width"= "30px", "targets" = which(colnames(x) %in% c("n", "N"))-1),
list(visible = FALSE, targets = inv_cols),
Expand Down

0 comments on commit 16f2884

Please sign in to comment.