gilbitron / laravel-vue-pagination

A Vue.js pagination component for Laravel paginators
https://laravel-vue-pagination.org
MIT License
750 stars 143 forks source link

Property "$createElement" was accessed during render but is not defined on instance. #122

Closed chuksdsilent closed 2 years ago

chuksdsilent commented 2 years ago

I am using vue 3 and typescript and I want to implement your library on my application

<template>
   <div>
    <table>
    <tr v-for="(hub, index) in hubs" :key="index">
      <td>{{ index + 1 }}</td>
      <td>{{ hub.name }}</td>
     <td>{{ hub.contact_address }}</td>
    </tr>
   </table>
    <pagination :data="hubs" @pagination-change-page="getResults"></pagination>
   </div>
</template>

Javascript


<script lang="ts">
export default {
  name: "AllHubs",
  setup() {
   let hubs = {}
 onMounted(() => {
      getResults();
    });

    const getResults = (page = 1) => {
      Admin.getAllHubs(1)
        .then((response) => {
          hubs = response.data;
        })
        .catch((error) => {

        })
        .finally(() => {

        });
    };
    return { hubs, getHub, getResults };

}

Error

[Vue warn]: Property "$createElement" was accessed during render but is not defined on instance. 
  at <Pagination data=undefined onPaginationChangePage=fn<getResults> > 
  at <AllHubs onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <RouterView> 
  at <Index onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <RouterView> 
  at <App>
github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] commented 2 years ago

This issue was closed because it has been inactive for 30 days since being marked as stale.