vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

feat(VDataIterator): add filtered items count to slot data

Open blalan05 opened this issue 2 years ago • 0 comments

<template>
  <v-app>
    <v-container>
      <v-row>
        <v-text-field v-model="search" label="Search" />
      </v-row>
      <v-row>
        <v-col cols="12">
          <div style="height: 600px">
            <v-data-iterator :items="items" :search="search">
              <template #default="{ items }">
                <template
                  v-for="(item, i) in items"
                  :key="i"
                >
                  <v-card v-bind="item.raw" />

                  <br>
                </template>
              </template>
              <template #footer="{ itemsCount}">
                {{ itemsCount }}
              </template>
            </v-data-iterator>
          </div>
        </v-col>
      </v-row>
    </v-container>
  </v-app>
</template>

<script>
  import { ref } from 'vue'

  export default {
    name: 'Playground',
    // eslint-disable-next-line padded-blocks
    setup () {
      const search = ref(null)
      const items = ref([
        { title: 'Item 1' },
        { title: 'Option 2' },
      ])
      return {
        items,
        search,
      }
    },
  }
</script>

blalan05 avatar Nov 09 '23 16:11 blalan05