quasar
quasar copied to clipboard
QDrawer contents get destroyed when resizing layout
What happened?
When resizing a layout containing a drawer, resizing past the breakpoint causes child components to get destroyed and recreated.
This does not happen when closing and opening the drawer normally, via its model.
What did you expect to happen?
I expect the drawer's internal components to persist and not be recreated needlessly.
Reproduction URL
https://stackblitz.com/edit/quasarframework-lkdaws?file=src%2Flayouts%2FMainLayout.vue
How to reproduce?
- Go to the provided link.
- Open the left drawer and notice the colored block. It changes color in its
onMountedlifecycle hook. - Make the window narrow and wide again. Observe the colored block has changed color.
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Components (quasar), SPA Mode
Platforms/Browsers
Firefox, Chrome
Quasar info output
Operating System - Linux(5.0 (Windows)) - linux/x64
NodeJs - 18.18.0
Global packages
NPM - 9.4.2
yarn - 1.22.19
@quasar/cli - undefined
@quasar/icongenie - Not installed
cordova - Not installed
Important local packages
quasar - 2.9.2 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
@quasar/app-vite - 1.1.2 -- Quasar Framework App CLI with Vite
@quasar/extras - 1.15.4 -- Quasar Framework fonts, icons and animations
eslint-plugin-quasar - Not installed
vue - 3.2.40 -- The progressive JavaScript framework for building modern web UI.
vue-router - 4.1.5
pinia - Not installed
vuex - Not installed
vite - 2.9.15 -- Native-ESM powered web dev build tool
eslint - 8.24.0 -- An AST-based pattern checker for JavaScript.
electron - Not installed
electron-packager - Not installed
electron-builder - Not installed
register-service-worker - 1.7.2 -- Script for registering service worker, with hooks
@capacitor/core - Not installed
@capacitor/cli - Not installed
@capacitor/android - Not installed
@capacitor/ios - Not installed
Quasar App Extensions
*None installed*
Networking
Host - quasarframeworklkdaws-rkpk
en0 - 192.168.1.104
Relevant log output
No response
Additional context
No response