shiny.semantic icon indicating copy to clipboard operation
shiny.semantic copied to clipboard

semantic_DT options doesn't work[Bug]:

Open ugurdar opened this issue 3 years ago • 0 comments

Hi,

I'm trying to right justify the text in the datatable, but I can't do it even though I define it in options.

I can use formatStyle('column',` textAlign = 'center') but it affects only column body and not the header.

if (interactive()){
  library(shiny)
  library(shiny.semantic)
  
  ui <- semanticPage(
    semantic_DTOutput("table")
  )
  server <- function(input, output, session) {
    output$table <- DT::renderDataTable(
      semantic_DT(iris,
                  options = list(
                    columnDefs = list(
                      list(className = 'dt-right', targets = 1:3)
                      )
                    )
                  )
    )
  }
  shinyApp(ui, server)
}

ugurdar avatar Aug 17 '22 07:08 ugurdar