Currently the default behavior of the navigation-drawer is that it opens when the page is opened wide enough. I'm sure this is a nice option to have, however it would be nice to not have it open at these wider screen widths. I'm having trouble getting it to do what I want and it would be nice if it was easy to change this behavior.
@erichodges It is easy to control this behavior, you just have to read the docs.
Add the prop called disable-resize-watcher and make the drawer v-model property false by default:
https://codepen.io/anon/pen/varbpZ?&editors=101
<v-navigation-drawer
v-model="drawer"
disable-resize-watcher
>
And then in data() section do this:
drawer: false
Please only create issues with the provided templates. In the boilerplate for creating an issue, it explains that any ticket made without this will be automatically closed. Thank you.
Thanks @AlexSHoffman ! I didn't find it in the docs, I looked there first. If you have a moment, please let me know what section covers this. The disable-resize-watcher worked...although now when the drawer is open and I click in the main content area, the drawer no longer closes. I have to click on the hamburger icon to get it to close. How can I fix that?
@KaelWD Sorry, I'll use the template next time :-).
@erichodges you can find all the available API (props) for a component in the API section. Every component page has this section. Scroll the page down a little bit and you will see it:
https://vuetifyjs.com/en/components/navigation-drawers#introduction
As for your second question, again, look in the docs:
temporary prop is what you need, so add this prop and it will behave the way you need it:<v-navigation-drawer
v-model="drawer"
temporary
disable-resize-watcher
>
@AlexSHoffman Cool, that worked, thank you! Ok, I will read up on that section, many thanks.
Most helpful comment
@erichodges It is easy to control this behavior, you just have to read the docs.
Add the prop called
disable-resize-watcherand make the drawer v-model propertyfalseby default:Example:
https://codepen.io/anon/pen/varbpZ?&editors=101
And then in data() section do this: