ashokkrish / spatialEpisim

spatialEpisim: Spatial Tracking of Infectious Disease Epidemics using Mathematical Models
GNU General Public License v3.0
9 stars 4 forks source link

`conditionalPanel`s are broken #48

Closed bryce-carson closed 3 months ago

bryce-carson commented 3 months ago

The conditionalPanel() function creates a div whose visibility is controlled by a JavaScript expression. This basic Shiny UI functionality is used in multiple places in our UI, and was working correctly a while ago.

On my Linux machine, while using Firefox, it appears that new conditionalPanels that I write are not working, despite the code being syntactically and semantically correct. I'm unsure how to debug this at the moment.

bryce-carson commented 3 months ago

The issue is resolved when a UI input which is undefined is not accessed. Accessing input objects by the proper name resolved the issue and restored conditionalPanel functionality elsewhere.

I had renamed the modelSelect input to enabledCompartments, and forgotten to update its name in the UI. Accessing input$modelSelect causes serious issues and doesn't properly throw a warning on the server side of Shiny, which is odd. I'll ask a question about this in the Shiny forums on Posit's website.