quasar icon indicating copy to clipboard operation
quasar copied to clipboard

QDrawer contents get destroyed when resizing layout

Open rotu opened this issue 2 years ago • 0 comments

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.

Recording2024-01-09161801-ezgif com-video-to-gif-converter

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?

  1. Go to the provided link.
  2. Open the left drawer and notice the colored block. It changes color in its onMounted lifecycle hook.
  3. 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

rotu avatar Jan 09 '24 22:01 rotu