title: observeEvent or eventReactive not working right. Im using it to only display the table when button clicked. isolate not working unless im wrong
body: <pre><code>server &lt;- function(input, output) {
    observe({
        # check if all mandatory fields have a value
        mandatoryFilled &lt;-
        vapply(fieldsMandatory,
               function(x) {
                 !is.null(input[[x]]) &amp;&amp; input[[x]] != &quot;&quot;
               },
               logical(1))
      mandatoryFilled &lt;- all(mandatoryFilled)
  
      # enable/disable the submit button
      shinyjs::toggleState(id = &quot;btn&quot;, condition = mandatoryFilled)
      observeEvent(input$btn, {
          output$inventory &lt;- renderDataTable(result[result$lot == input$lot, ])
      })
    })
  }
  </code></pre>
  <p>I tried isolate it was not working i am not sure if i am doing it right. both eventReactive and observeEvent are not working right. Please someone help me figure this out. input$lot is an input from the user and the input is used to display information from a datatable.</p>