Maximize modals on mobile, minimize on desktop
-
I notice modals have properties “minimized” and “maximized”, but how can I apply one to mobile views and another to desktop (or other size) views?
-
If memory serves, you can detect the platform you’re on (ah, yes: https://quasar-framework.org/components/platform-detection.html).
You can then assign minimized and maximized booleans based on the result of checking platform. the properties would look like :minimized=“someDataElement” and you’d set someDataElement in the check.
-
I will try that, thanks!
-
@ssuess This is automatic and does its own platform checking. The minimized and maximized are there if you need to override the default behavior. Modals are responsive to the width of the window (see demo on a desktop and resize browser window). Sometimes you need to always have a Modal maximized or minimized regardless of window width, so to do this, Quasar offers the minimized and maximized props: https://quasar-framework.org/components/modal.html