RXSpreadsheet icon indicating copy to clipboard operation
RXSpreadsheet copied to clipboard

row/col length set in options not respected

Open nanxstats opened this issue 4 years ago • 1 comments

It looks like row and col set in options are not effective, although the other parameters are. I'm not sure if this is from upstream, but here is a minimal reproducible example:

library("shiny")
library("RXSpreadsheet")

ui <- fluidPage(
  RXSpreadsheetOutput(outputId = "example")
)

server <- function(input, output) {
  output$example <- RXSpreadsheet::renderRXSpreadsheet({
    df <- dataFrameListToList(list(
      "sheet1" = data.frame(matrix(rnorm(25), nrow = 5, ncol = 5))
    ))
    RXSpreadsheet(df, options = list(
      "showGrid" = FALSE,
      "row" = list("len" = 10),
      "style" = list(bgcolor = "#DDD")
    ))
  })
}

shinyApp(ui = ui, server = server)
Screen Shot 2020-12-09 at 11 47 47 AM

Thanks for creating the package.

nanxstats avatar Dec 09 '20 16:12 nanxstats

Hi Nan,

Thank you for raising this issue. I have been doing a bit of testing and it seems that the actual javascript library works correctly with the len setting for row and col.

Upgrading the xspreadsheet.js file for RXSpreadsheet unfortunately did not do the trick. There might be an issue in the list to JSON conversion, I will check it later.

Best regards,

Michael

MichaelHogers avatar Dec 10 '20 21:12 MichaelHogers