r - RStudio Shiny: The confliction between an action button and a submit button -


in r shiny app, have action , submit button.

server <- function(input, output) {   x = reactive(data.frame(x=rnorm(10),y=rpois(10,10),z=runif(10)))   y = eventreactive(input$flush, {     x()[,sample(1:3)]   },ignorenull=false)    output$distplot <- rendertable({     y()       }) }  ui <- fluidpage(   actionbutton("flush","flush order"),   submitbutton("update"),   tableoutput("distplot")  )   shinyapp(ui = ui, server = server) 

what want: order of variables randomly changing when click action button.

what happens: have click action button first , subsequently click submit button execute.

question: how can desired behavior while keeping submit button.

there many tabs more submit buttons in app. it's desirable add action button without affecting rest of contents.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -