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

semantic_DT options doesn't work[Bug]: #417

Closed
ugurdar opened this issue Aug 17, 2022 · 1 comment
Closed

semantic_DT options doesn't work[Bug]: #417

ugurdar opened this issue Aug 17, 2022 · 1 comment
Assignees
Labels

Comments

@ugurdar
Copy link

ugurdar commented Aug 17, 2022

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 ugurdar added the bug label Aug 17, 2022
@ugurdar ugurdar closed this as completed Aug 17, 2022
@ugurdar ugurdar reopened this Aug 17, 2022
@esraay esraay self-assigned this Oct 21, 2022
@esraay
Copy link
Contributor

esraay commented Oct 23, 2022

Hi @ugurdar, the class name you have provided is not supported by fomanticUI. For your example, you can update the class name with "right aligned". To explore all features of fomanticUI tables you can check out https://fomantic-ui.com/collections/table.html

Also, we are progressing with some work about style and class arguments for semantic_DT in #409, after this work merges you will be able to use this 'dt-right' class without fomantic UI classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants