question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

QDrawer cannot be initially set to true

See original GitHub issue

What happened?

QDrawer initial value to true doesn’t work.

What did you expect to happen?

I expected the Drawer to stay open after refresh

Reproduction URL

https://codesandbox.io/s/qdrawer-cannot-be-set-to-true-3k0fg?file=/src/App.vue

How to reproduce?

  1. Go the the reproduction link
  2. Refresh the view
  3. Observe that the Drawer auto-closes when instead should stay open

Flavour

Quasar CLI (@quasar/cli | @quasar/app)

Areas

SPA Mode

Platforms/Browsers

Chrome

Quasar info output

No response

Relevant log output

No response

Additional context

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
rstoenescucommented, Jan 27, 2022

@Rolanddoda

  1. Workaround until I’ll sort this out: use “persistent” prop on the QDrawer. Ruled out Vue as a root cause. It might actually be a regression in vue-router because it all starts from a route watcher. Will keep this thread up to date as I progress.
  2. Thanks for reporting and for your time! Please do not take Dan’s comments in a negative fashion. We’re all dealing with lots of stuff on our plate and just trying to make the best of it, but sometimes exhaustion can lead to things like this. All it matters is that in the end Quasar can serve developers even better.
1reaction
rstoenescucommented, Jan 27, 2022

Pushed a perf improvement on route watching though. It’ll go into Quasar v2.4.14. A side-effect will be that if your app is started from the root route, it won’t trigger the drawer hide() call described earlier (even if you put QDrawer directly under App.vue). But if starting your app with another route, the problem will still happen.

Bottom line: get your layout out of App.vue or use persistent on QDrawer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

QDrawer ignores 'show-if-above' property when window is ...
My problem isn't with the initial state. It's that after I resize the window, quasar sets the model to true if the initial...
Read more >
DRAWER component of @material-ui/core does not appear ...
I cannot get the drawer to appear when I leave the variant prop as the ... does get toggled to "true" but the...
Read more >
Layout Drawer | Quasar Framework
When QDrawer is set into overlay mode, it will force it to go into fixed position, regardless if QLayout's “view” prop is configured...
Read more >
Drawer Navigator | React Navigation
Whether this screen should render the first time it's accessed. Defaults to true . Set it to false if you want to render...
Read more >
How to have a page with or without q-drawer - Quasar forum
Something like “if activeTab is set, you can't set it to null”. That way it's easy to keep the correct tab highlighted.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found