Use href infobox as actionbutton

前端 未结 3 759
执念已碎
执念已碎 2020-12-17 00:49

I was building an App with Rshiny.

I have a couple of infoBoxand I would like to use the href option to make a po

3条回答
  •  萌比男神i
    2020-12-17 01:00

    I know only bad variant

    1) add function tags$script(HTML("function clickFunction(link){ Shiny.onInputChange('linkClicked',link); }"))

    2) edit href children of your valueBox

    aa=valueBox(value="22", icon = icon("users","fa-lg",lib="font-awesome"),href="www", width=NULL,color = "light-blue",subtitle = "" ) aa$children[[1]]=a(href="#","onclick"=paste0("clickFunction('","click","'); return false;"),aa$children[[1]]$children)

    3) observeEvent(input$linkClicked,{..})

提交回复
热议问题