Skip to content

Commit

Permalink
example cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Sek authored Jan 23, 2025
1 parent 461b823 commit 23c143f
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions packages/docs/src/examples/v-infinite-scroll/status-reset.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
<template>
<v-app>
<v-container>
<div class="d-flex ga-3">
<v-chip>Server items: {{ serverItems.length }}</v-chip>
<v-chip>Loaded items: {{ items.length }}</v-chip>
</div>
<v-infinite-scroll ref="scroll" height="300" side="both" @load="load">
<template v-for="(item, index) in items" :key="index">
<div :class="['px-2', index % 2 === 0 ? 'bg-grey-lighten-2' : '']">
Item number {{ item }}
</div>
</template>
</v-infinite-scroll>

<div class="d-flex ga-3 mt-2">
<v-btn @click="prependFewMore(); reset('start')">prepend items + reset('start')</v-btn>
<v-btn @click="appendFewMore(); reset('end')">append items + reset('end')</v-btn>
<v-btn @click="reset()">just reset()</v-btn>
</div>
</v-container>
</v-app>
<v-container>
<div class="d-flex ga-3 mb-2">
<v-chip>Server items: {{ serverItems.length }}</v-chip>
<v-chip>Loaded items: {{ items.length }}</v-chip>
</div>
<v-infinite-scroll ref="scroll" height="300" side="both" @load="load">
<template v-for="(item, index) in items" :key="index">
<div :class="['px-2', index % 2 === 0 ? 'bg-grey-lighten-2' : '']">
Item number {{ item }}
</div>
</template>
</v-infinite-scroll>

<div class="d-flex ga-3 mt-2">
<v-btn @click="prependFewMore(); reset('start')">prepend items + reset('start')</v-btn>
<v-btn @click="appendFewMore(); reset('end')">append items + reset('end')</v-btn>
<v-btn @click="reset()">just reset()</v-btn>
</div>
</v-container>
</template>

<script setup>
Expand Down

0 comments on commit 23c143f

Please sign in to comment.