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

Tippy and insertUI #22

Open
bartekch opened this issue Feb 25, 2022 · 0 comments
Open

Tippy and insertUI #22

bartekch opened this issue Feb 25, 2022 · 0 comments

Comments

@bartekch
Copy link

I want to create an actionButton with tippy inside insertUI, unfortunately I can't get it working. I've tried the following approaches, without success.

library(shiny)
library(tippy)
shinyApp(
  ui = basicPage(
    actionButton("add", "Add ui")
  ),
  
  server = function(input, output) {
    observeEvent(input$add, {
      insertUI(
        "#add",
        "afterEnd",
        tagList(
          tippy::tippy(
            actionButton("button1", "tippy"),
            "Tooltip 1"
          ),
          actionButton("button2", "tippyThis"),
          tippy::tippyThis("button2", "Tooltip 2")
        )
      )
    })
  }
)

This was tested with version 1.0.0.

In CRAN version 0.0.1 both approaches (their corresponsing versions) seem to work.

library(shiny)
library(tippy)
shinyApp(
  ui = basicPage(
    actionButton("add", "Add ui")
  ),
  
  server = function(input, output) {
    observeEvent(input$add, {
      insertUI(
        "#add",
        "afterEnd",
        tagList(
          tippy::with_tippy(
            actionButton("button1", "with_tippy working"),
            "Tooltip 1"
          ),
          actionButton("button2", "tippy_this not working"),
          tippy::tippy_this("button2", "Tooltip 2")
        )
      )
    })
  }
)

Is it possible to add tooltips to elements created by insertUI using tippy 1.0.0?

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