Recognize Mobile View in Javascript

I'm using a different input for mobile and desktop views (button group vs. multiselect; each is only visible in their respective views), the results of which are being used in a query. Is there a way to detect whether the app is in mobile or desktop view so I can know which input to pull data from? Thanks in advance!

Hi @liv

The mobile layout is triggered when the width of a user's viewport is 600 pixels or less. Maybe you could reference the viewport properties

1 Like