Skip to content

Commit

Permalink
Enable sorting for ColReorder by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ashbaldry committed Nov 15, 2023
1 parent 19004d9 commit bca0d5b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/datatables.R
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ datatable = function(
if (is.null(options[['autoWidth']])) options$autoWidth = FALSE
# disable CSS classes for ordered columns
if (is.null(options[['orderClasses']])) options$orderClasses = FALSE
# enable column names for column reordering by default
if (is.null(options[['columns']])) {
options$columns = lapply(names(data), function(e) list(name = e))
}

cn = base::colnames(data)
if (missing(colnames)) {
Expand Down

0 comments on commit bca0d5b

Please sign in to comment.