virtual-list
virtual-list copied to clipboard
Undefined error even though passing valid array
I'm getting the error: [Vue warn]: Error in setup: "TypeError: Cannot read properties of undefined (reading 'length')". But the options array I'm passing is valid and i haven't read the length property anywhere.
It was working initially, but after i generated new js bundle it stopped working. I'm on Vue 2.7.16 I have also installed the @vue/composition-api package during initial setup.
This is the import I'm using
import VList from '@virtual-list/vue/vue2'
Code:
<VList
ref="list"
:items="options"
:first-render="10"
item-key="index"
class="scroller"
>
</Vlist>
it is caused by vue2.7. Vue 2.7 support reactive like @vue/composition-api except arrays. So you need downgrade to Vue2.6 and regenrate.
it is caused by vue2.7. Vue 2.7 support
reactivelike @vue/composition-api except arrays. So you need downgrade to Vue2.6 and regenrate.
Okay thanks I'll try that