vuetify
vuetify copied to clipboard
feat(VVirtualScroll): port to v3
Description
BREAKING CHANGES
-
bench
prop removed
Motivation and Context
How Has This Been Tested?
Markup:
<template>
<v-app>
<div class="pa-4 h-100">
<v-virtual-scroll :items="items" height="800" item-height="48" dynamic-item-height>
<template #default="{ item, index }">
<div
:class="[
index % 2 === 0 ? 'pa-2' : index % 5 == 0 ? 'pa-8' : 'pa-4',
index % 2 === 0 ? 'bg-primary' : 'bg-secondary'
]"
>
I'm item item {{ item }} (index {{ index }})
</div>
</template>
</v-virtual-scroll>
<v-select :items="items" label="Foo"></v-select>
</div>
</v-app>
</template>
<script>
export default {
data: () => ({
drawer: false,
count: 10000,
}),
computed: {
items () {
return Array.from({ length: this.count }, (k, v) => v + 1)
},
},
}
</script>
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)
Checklist:
- [ ] The PR title is no longer than 64 characters.
- [ ] The PR is submitted to the correct branch (
master
for bug fixes and documentation updates,dev
for new features and backwards compatible changes andnext
for non-backwards compatible changes). - [ ] My code follows the code style of this project.
- [ ] I've added relevant changes to the documentation (applies to new features and breaking changes in core library)