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_this not working for some input widgets #2

Open
markgrujic opened this Issue Nov 29, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@markgrujic
Copy link

markgrujic commented Nov 29, 2018

Hi and thanks again for the package.

It appears that tippy_this doesn't work with all widgets:

library(shiny)
library(tippy)
shinyApp(
  ui = fluidPage(
    
    textInput('text', 'Text'),
    tippy_this('text', tooltip = 'tiiiip'),
    
    selectInput('select', 'Select', c('a', 'b')),
    tippy_this('select', tooltip = 'tiiiip'),
    
    numericInput('numeric', 'Numeric', NULL),
    tippy_this('numeric', tooltip = 'tiiiip'),
    
    radioButtons('radio', 'Radio', c('a', 'b')),
    tippy_this('radio', tooltip = 'tiiiip'),
    
    checkboxInput('check', 'Check'),
    tippy_this('check', tooltip = 'tiiiip'),
    
    actionButton('action', 'Action'),
    tippy_this('action', tooltip = 'tiiiip'),
    
    sliderInput('slider', 'Slider', 0, 1, 0.5),
    tippy_this('slider', tooltip = 'tiiiip'),
    
    dateInput('date', 'Date'),
    tippy_this('date', tooltip = 'tiiiip')
    
  ),
  server = function(input, output) {}
)

selectInput and sliderInput don't have tippy tips.

Cheers

@JohnCoene

This comment has been minimized.

Copy link
Owner

JohnCoene commented Nov 29, 2018

Yes indeed.

Will take a bit of work to fix. in the update I just pushed the code below works in most cases. I'm unsure why some tooltips are not rendered, the JavaScript is correct. I shall look into that, thank you for reporting it.

library(shiny)
library(tippy)

shinyApp(
  ui = fluidPage(
    
    with_tippy(
      textInput('text', 'Text'),
      tooltip = "TEXT"
    ),
    
    with_tippy(
      selectInput('select', 'Select', c('a', 'b')),
      "SELECT"
    ),
    
    with_tippy(
      numericInput('numeric', 'Numeric', NULL),
      "NUMERIC"
    ),
    
    with_tippy(
      radioButtons('radio', 'Radio', c('a', 'b')),
      "RADIO"
    ),
    
    with_tippy(
      checkboxInput('check', 'Check'),
      "CHECKBOX"
    ),
    
    with_tippy(
      actionButton('action', 'Action'),
      "BUTTON"
    ),
    
    with_tippy(
      sliderInput('slider', 'Slider', 0, 1, 0.5),
      "SLIDER"
    ),
    
    with_tippy(
      dateInput('date', 'Date'),
      "DATE"
    )
    
  ),
  server = function(input, output) {}
)

@JohnCoene JohnCoene added the bug label Nov 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.