Open
Description
Guidelines
- I agree to follow this project's Contributing Guidelines.
Project Version
1.0
Platform and OS Version
Tested in Windows and Google Chrome
Existing Issues
No response
What happened?
I wanted to use a modal when the empty state content is shown
Steps to reproduce
- Run the following app. Try showing the modal with and without the empty state shown.
library(shiny)
library(shiny.emptystate)
ui <- fluidPage(
use_empty_state(),
actionButton("show", "Show empty state!"),
actionButton("hide", "Hide empty state!"),
actionButton("modal", "Show modal"),
tableOutput("my_table")
)
server <- function(input, output, session) {
empty_state_content <- div(
"This is example empty state content"
)
empty_state_manager <- EmptyStateManager$new(
id = "my_table",
html_content = empty_state_content
)
observeEvent(input$show, empty_state_manager$show())
observeEvent(input$hide, empty_state_manager$hide())
observeEvent(input$modal, {
showModal(modalDialog(title = "Hello from modal"))
})
output$my_table <- renderTable(mtcars)
}
shinyApp(ui, server)
Expected behavior
The modal shoul be over the empty state content
Attachments
No response
Screenshots or Videos
No response
Additional Information
It seems to be that the problem is here:
shiny.emptystate/inst/emptystate.css
Lines 8 to 10 in 9963c95
But I don't know what would be the best solution for it 🤔