Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(VNavigationDrawer): allow temporary drawers to be persistent #19552

Merged
merged 6 commits into from Apr 22, 2024

Conversation

vstyler96
Copy link
Contributor

@vstyler96 vstyler96 commented Apr 6, 2024

Description

This PR allows use persistent attribute in temporary VNavigationDrawer, so we can prevent closing the drawer on outside click, and instead close the drawer programatically when its temporary.

Markup:

<template>
  <v-app>
    <v-navigation-drawer
      v-model="drawer"
      persistent
      temporary
    >
      <v-list-item
        prepend-avatar="https://randomuser.me/api/portraits/men/78.jpg"
        title="John Leider"
      />

      <v-divider />

      <v-list density="compact" nav>
        <v-list-item
          prepend-icon="mdi-view-dashboard"
          title="Home"
          value="home"
        />
        <v-list-item
          prepend-icon="mdi-forum"
          title="About"
          value="about"
        />
      </v-list>
    </v-navigation-drawer>
    <v-main style="height: 250px">
      <div class="d-flex justify-center align-center h-100">
        <v-btn
          color="primary"
          @click.stop="drawer = !drawer"
        >
          Toggle
        </v-btn>
      </div>
    </v-main>
  </v-app>
</template>

<script>
  export default {
    data () {
      return {
        drawer: null,
      }
    },
  }
</script>

@MajesticPotatoe MajesticPotatoe added T: feature A new feature C: VNavigationDrawer VNavigationDrawer labels Apr 9, 2024
@MajesticPotatoe MajesticPotatoe changed the base branch from master to dev April 9, 2024 14:21
@MajesticPotatoe MajesticPotatoe changed the base branch from dev to master April 9, 2024 14:21
Copy link
Member

@MajesticPotatoe MajesticPotatoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • rebase to dev

@johnleider johnleider changed the base branch from master to dev April 9, 2024 14:25
@johnleider johnleider changed the base branch from dev to master April 9, 2024 14:25
@johnleider johnleider changed the base branch from master to dev April 9, 2024 14:26
@johnleider
Copy link
Member

This has unrelated changes.

@vstyler96
Copy link
Contributor Author

@johnleider This should be ready again 😄

@vstyler96 vstyler96 changed the title feat(VNavigationDrawer): Allo temporary drawers to be persistent feat(VNavigationDrawer): Allow temporary drawers to be persistent Apr 22, 2024
@johnleider johnleider changed the title feat(VNavigationDrawer): Allow temporary drawers to be persistent feat(VNavigationDrawer): allow temporary drawers to be persistent Apr 22, 2024
@johnleider johnleider added this to the v3.6.0 (Nebula) milestone Apr 22, 2024
@johnleider johnleider merged commit 74cc2bf into vuetifyjs:dev Apr 22, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VNavigationDrawer VNavigationDrawer T: feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants