lusaxweb / vuesax

New Framework Components for Vue.js 2
https://lusaxweb.github.io/vuesax/
MIT License
5.64k stars 741 forks source link

Error in mounted hook: "TypeError: Invalid attempt to spread non-iterable instance" when using VsTable #940

Closed u007 closed 3 years ago

u007 commented 3 years ago

i tried to embed the simplest vstable code and getting error stated in title

<template>
  <div>
      <vs-table>
    <template #thead>
      <vs-tr>
        <vs-th>
          Name
        </vs-th>
        <vs-th>
          Email
        </vs-th>
        <vs-th>
          Id
        </vs-th>
      </vs-tr>
    </template>
  </vs-table>
</div>
</template>

haven't even tried to insert body yet

error:

[Vue warn]: Error in mounted hook: "TypeError: Invalid attempt to spread non-iterable instance"

found in

---> <VsTable>
       <Index> at src/views/orders/Index.vue
         <Main> at src/layouts/main/Main.vue
           <App> at src/App.vue
             <Root>
margot-vogo commented 3 years ago

You must use <vs-table v-if="data && data.length"> for check if data is loaded.

u007 commented 3 years ago

thank you , works fine now