I do have a table with a width that is bigger than the modalDialog() element which display it. I would like this specific modialDialog() (I do have others in the app that I don't want to modify) to have a sufficient width to fully display the DT object.
I tried to use the size = "l" argument of modalDialog() without success. Could someone help me to figure out to do this? Strangely I was not able to find any clues on that despite some css changes that impact all modals.
Below a minimal example:
require(shiny)
require(DT)
shinyApp(
ui = basicPage(
actionButton("show", "Show modal dialog")
),
server = function(input, output) {
# Render DT
output$dt <- DT::renderDT(cbind(iris, iris))
# Modal management
observeEvent(input$show, {
showModal(
modalDialog(
size = "l",
easyClose = T,
DT::DTOutput("dt"),
footer = tagList(
modalButton("Cancel"),
actionButton("ok", "OK")
)
)
)
})
}
)