In the example below, the table does not appear when the checkbox is clicked. On the other hand, if the checkboxInput default value is set to TRUE, the table widget appears.
I think the problem is related to the resize when a conditionalPanel is involved. Using the code below, the rhandsontable.js resize function shows that the widget height is being set to 0 when the checkbox is checked.
library(shiny)
library(rhandsontable)
server <- function(input, output) {
output$tbl <- renderRHandsontable({
rhandsontable(data.frame(col1 = LETTERS[1:10], col2 = 1:10))
})
}
ui <- shinyUI(fluidPage(
sidebarLayout(
sidebarPanel(
checkboxInput("check", "Show Table", FALSE),
conditionalPanel("input.check === true",
rHandsontableOutput("tbl"))
),
mainPanel()
)
))
shinyApp(ui = ui, server = server)
In the example below, the table does not appear when the checkbox is clicked. On the other hand, if the
checkboxInputdefault value is set toTRUE, the table widget appears.I think the problem is related to the
resizewhen aconditionalPanelis involved. Using the code below, the rhandsontable.jsresizefunction shows that the widgetheightis being set to 0 when the checkbox is checked.