在禁用按钮上添加shinyBS popover

克劳德

我没有找到的文档的任何信息shinyBS,并在谷歌/ SO有关如何使用trigger = 'manual'的,例如,addPopovershinyBS我认为这是向禁用按钮添加工具提示的方法。(我不想通过div'ving the button 并给予titleto来做到这一点div。如果有人有办法将工具提示反应性地添加到shiny应用程序中也会很好

克劳德

由于shosaco的解决方案对我不起作用,我让它以这种方式工作:

if (input$disable) { 
  addCssClass("buttonId", "disabled")
  bsTooltip("buttonId", "This button is currently disabled.")
} else {
  bsTooltip("buttonId", "")
  removeCssClass("buttonId", "disabled")
}
observeEvent(input$buttonId, {
    if (!input$disable) {
      output$text <- renderText("Bla")
    } else {
      output$text <- renderText(NULL)
    }

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章