We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d24dc3 commit c63129fCopy full SHA for c63129f
src/components/DynamicScrollerItem.vue
@@ -50,7 +50,9 @@ export default {
50
51
computed: {
52
id () {
53
- return this.vscrollData.simpleArray ? this.index : this.item[this.vscrollData.keyField]
+ if (this.vscrollData.simpleArray) return this.index;
54
+ if (this.item.hasOwnProperty(this.vscrollData.keyField)) return this.item[this.vscrollData.keyField];
55
+ throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`);
56
},
57
58
size () {
0 commit comments