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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -