Skip to content

Issue while trying to render a glide component inside a material_modal #134

@dimmin

Description

@dimmin

Original SO post: https://stackoverflow.com/questions/68071794/rendering-a-r-shiny-glide-component-inside-a-material-modal

When I try to embed a glide() component within a material_modal() I do have a strange output as displayed in the picture.
image

Can someone explain to me from where this behavior comes from?

library(shiny)
library(shinymaterial)
library(shinyglide)

modal_controls <- glideControls(
  list(
    prevButton(),
    firstButton(
      class = "btn btn-danger",
      `data-dismiss`="modal",
      "No, thanks !"
    )
  ),
  list(
    nextButton(),
    lastButton(
      class = "btn btn-success",
      `data-dismiss`="modal",
      "Done"
    )
  )
)

ui <- material_page(
  title = "Basic Page",
  tags$h1("Page Content"),
  material_modal(
    modal_id = "example_modal",
    button_text = "Modal",
    button_icon = "open_in_browser",
    title = "Startup assistant",

    glide(
      custom_controls = modal_controls,
      screen(next_label = 'Yes, please ! <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>',
        p("Let's initialize some values, would you ?")
      ),
      screen("First, please select a mean value"),
      screen("."),
      screen(p("Thanks, we're all set !"))
    )
  )
)

server <- function(input, output) { }
shinyApp(ui = ui, server = server)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions