-1

I have been using shinyalert() in shiny apps for a while, but on my current app, they have stopped disappearing after I click ok. They still work in other apps (using the same package loader script), and I haven't been able to replicate the problem (when I created an app that does nothing but produce an alert when I click an action button, it worked properly), so I can't share any code snippets. I'm wondering if there are any settings somewhere that I'm not aware of that may be affecting it.

I've tried specifying showConfirmButton=TRUE (which is the default) and showCancelButton = TRUE, and that doesn't help.

I can include my code as well, but since I don't know where the problem area is, I'd prefer not to clutter this up with 100+ lines.

Thanks!

Martin Gal
  • 16,640
  • 5
  • 21
  • 39
tamarack
  • 377
  • 1
  • 11
  • Can you provide `ui` and `server` code required for the question to be completely reproducible along with necessary data if required? – Ronak Shah Sep 04 '21 at 01:27
  • 1
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Sep 04 '21 at 06:05
  • @MrFlick as I said in the original question, I didn't include a reproducible example or my full code because I couldn't produce a short example where the problem actually arose, and I didn't want to provide the full 1000+ line script unprompted. The problem ended up being that I had the shiny alert inside a `conditionalPanel()`; I replaced that with `renderUI` and that solved it. Thank you for the help though. – tamarack Sep 08 '21 at 18:42

1 Answers1

0

The call to shinyalert() was inside conditionalPanel; I replaced all my conditional panels with renderUI( req(*condition*) ) and that solved the problem.

tamarack
  • 377
  • 1
  • 11