Skip to content

Commit

Permalink
Update utils.R
Browse files Browse the repository at this point in the history
  • Loading branch information
rich-iannone committed Jul 17, 2023
1 parent e11588e commit 55a742d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ is_gt_tbl_empty_w_rows <- function(data) {
# Adjustments for a completely empty table (no columns and no rows)
adjust_gt_tbl_empty <- function(data) {

data <- cols_add(data, no_data = "TABLE HAS NO DATA")
# Get the table's locale
tbl_locale <- dt_locale_get_value(data = data)

no_table_data_text <- get_locale_no_table_data_text(locale = tbl_locale)

data <- cols_add(data, no_data = no_table_data_text)
data <- tab_options(data, column_labels.hidden = TRUE)
data <- cols_align(data, align = "center", columns = no_data)
data <- cols_width(data, no_data ~ px(500))
Expand Down

0 comments on commit 55a742d

Please sign in to comment.