Shiny selectInput(multiple = TRUE) problem with mobile devices

I developed a dashboard to monitor covid-19 cases in Brazil using shiny and flexdashboard. It's working fine, but not on mobile devices (at least in some of them). At the sidebar there is a selectinput() with multiple=TRUE, and the problem is that every time the mobile user tries to select a value to update the plots, the screen keyboard is shown and the whole app is realoaded before the selection (for the correct usage the user needs to select the states and click on "Atualizar" button to update).

I tried to solve it by duplicating the siderbar section, and use {.no-mobile} for the first one, and {.mobile) for the second, and using multiple=FALSE in this second selectinput(). Unfortunately it won't work, and both sections were shown overlapping.

I thought about another way (and i don't know how to do it), using something like multiple=ifelse("is mobile test",FALSE,TRUE).

My questions are: Is there a way to test if the browser is mobile? Is there another approach do solve this problem?

Any help will be highly appreciated.

App link (code embed): https://costafilho.shinyapps.io/monitor_covid19/

Github project: https://github.com/sergiocostafh/monitor_covid19

Problematic line:

selectInput("estado",h3("Estados"),choices = est_nome, selected = "Sao Paulo", multiple = TRUE)

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