Additional buttons in v-list-group

657 views Asked by At

I want to build v-list-group which will be have additional buttons. But those buttons should not activate/deactivate group list. I have made example:

<div id="app">
  <v-app id="inspire">
    <v-card
      class="mx-auto"
      width="300"
    >
      <v-list>  
        <v-list-group
          :value="true"
          prepend-icon="mdi-account-circle"
        >
          <template v-slot:activator>
            <v-list-item-title>Users</v-list-item-title>
            <v-list-item-action>
              <v-btn icon>
                <v-icon>mdi-plus</v-icon> <!-- This button should not activate list -->
              </v-btn>
            </v-list-item-action>
          </template>
          <v-list-group
            :value="true"
            no-action
            sub-group
          >
            <template v-slot:activator>
              <v-list-item-content>
                <v-list-item-title>Admin</v-list-item-title>
              </v-list-item-content>
            </template>
  
            <v-list-item
              v-for="([title, icon], i) in admins"
              :key="i"
              link
            >
              <v-list-item-title v-text="title"></v-list-item-title>
  
              <v-list-item-icon>
                <v-icon v-text="icon"></v-icon>
              </v-list-item-icon>
            </v-list-item>
          </v-list-group>
        </v-list-group>
      </v-list>
    </v-card>
  </v-app>
</div>

https://codepen.io/mmasztalerczuk/pen/VwPGXjv

The plus button should not activate/deactivate group list when is pressed.

0

There are 0 answers