0

Is there a way to align the row names of a Rhandsontable in a Shiny app? I only found an argument to adjust the width (rowHeaderWidth), but not the alignment of the row names separately from the body of the table that I know can be done with hot_col(). If it's not possible using the rhandsontable() function, what should the CSS code be?

Simple Shiny example:

library(shiny)
library(rhandsontable)

ui <- fluidPage(
  rHandsontableOutput('table')
  
)

server <- function(input,output,session)({
  
  output$table <- renderRHandsontable({
    rhandsontable(mtcars, rowHeaderWidth = 200)
  })
  
  
}) 

shinyApp(ui = ui, server = server)
aynber
  • 22,380
  • 8
  • 50
  • 63
CrisG
  • 1
  • 3

1 Answers1

0

screenshot_01

screenshot_02

If you see screenshot 01 from browser inspection that you need to change text-align.
you can create style.css file and link the file in app (see screenshot 02)

Yousuf Ali
  • 48
  • 5