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(VExpandTransition): add group prop #19347

Merged
merged 1 commit into from
Mar 7, 2024
Merged

Conversation

ascott18
Copy link
Contributor

@ascott18 ascott18 commented Mar 6, 2024

Description

Adds support for VExpandTransition and VExpandXTransition to produce a TransitionGroup.

resolves #19210

Markup:

<template>
  <v-app>
    <v-container>
      <v-btn class="mb-2" color="primary" @click="randomize">Randomize</v-btn>

      <v-row>
        <v-col>
          <h2>v-expand-transition</h2>
          <v-expand-transition group>
            <v-card v-for="item in items" :key="item" :title="item" />
          </v-expand-transition>
        </v-col>
        <v-col>
          <h2>v-expand-x-transition</h2>
          <v-expand-x-transition group>
            <v-card v-for="item in items" :key="'x-' + item" :title="item" class="d-inline-block" />
          </v-expand-x-transition>
        </v-col>
      </v-row>
    </v-container>
  </v-app>
</template>

<script>
  import { ref } from 'vue'
  export default {
    name: 'Playground',
    setup () {
      const items = ref([])

      function randomize () {
        const newItems = []
        const count = 3 + Math.ceil(Math.random() * 3)
        for (let i = 0; i < count; i++) {
          let newNumber
          do {
            newNumber = Math.floor(Math.random() * 10)
          } while (newItems.includes(newNumber))
          newItems[i] = newNumber
        }
        items.value = newItems.sort()
      }

      randomize()

      return {
        items,
        randomize,
      }
    },
  }
</script>

@KaelWD KaelWD added this to the v3.6.0 (Nebula) milestone Mar 7, 2024
@KaelWD KaelWD enabled auto-merge (squash) March 7, 2024 01:42
@KaelWD KaelWD changed the title feat(VExpandTransition): add support for group prop to v-expand-transition feat(VExpandTransition): add group prop Mar 7, 2024
@KaelWD KaelWD disabled auto-merge March 7, 2024 01:42
@KaelWD KaelWD merged commit f785b7c into vuetifyjs:dev Mar 7, 2024
9 of 10 checks passed
VIXI0 pushed a commit to VIXI0/vuetify that referenced this pull request Mar 13, 2024
@MajesticPotatoe MajesticPotatoe added T: feature A new feature E: transition Transition composable labels Mar 19, 2024
VIXI0 pushed a commit to VIXI0/vuetify that referenced this pull request Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E: transition Transition composable T: feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants