我没有找到的文档的任何信息shinyBS
,并在谷歌/ SO有关如何使用trigger = 'manual'
的,例如,addPopover
的shinyBS
。我认为这是向禁用按钮添加工具提示的方法。(我不想通过div
'ving the button 并给予title
to来做到这一点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] 删除。
我来说两句