Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work well when within a shiny::modalDialog #29

Open
j-craggy opened this issue Jun 29, 2023 · 0 comments
Open

Does not work well when within a shiny::modalDialog #29

j-craggy opened this issue Jun 29, 2023 · 0 comments

Comments

@j-craggy
Copy link

j-craggy commented Jun 29, 2023

When the helper modal is closed, this also closes its parent shiny::modalDialog container. How can we avoid this behavior?

library(shiny)

ui <- fluidPage(
  fluidRow(
    actionButton("modal", "Open modal")
    )
  )

server <- function(input, output) {

  shinyhelper::observe_helpers()

  observeEvent(input$modal, {
    showModal(
      modalDialog(
        tagList(
          selectizeInput("input", "Input", c(1, 2, 3)) |>
            shinyhelper::helper(title = "Modal helper", type = "inline")
        )
      )
    )
  })
}

shinyApp(ui, server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant