How to adjust showModal in server of a shiny app

I have on my server something similar to the code below. See that showModal is inside my reactive ModelCl. So whenever you select filters 1, 2 and 3, a message appears. However, I would like to remove showModal from reactive and put it separately, and that has the same result, that is, the message appears after selecting filters 1, 2 and 3. Any tips on what to do, maybe use a observeEvent

server <- function(input, output,session) {     

v <- reactiveValues(df = NULL, clear=FALSE)

ModelCl<-reactive({if (!is.null(v$df)) {
 req(v$df,input$filter1,input$filter2,input$filter3)
 showModal(modalDialog("Wait a moment...", footer=NULL))
 on.exit(removeModal())
 function.cl(v$df,input$filter1,input$filter2,input$filter3,input$filter4,input$filter5)
  }
 })
}

shinyApp(ui = ui, server = server)

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.