1 year ago

#31182

test-img

etranz

laravel vue pagination Property "$createElement" was accessed during render but is not defined on instance

I am trying to use laravel vue pagination on my vue3 typescript app

https://github.com/gilbitron/laravel-vue-pagination

I have installed the library and registered it on my index.ts

<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(() => {

        });
    };
}

Error

[Vue warn]: Property "$createElement" was accessed during render but is not defined on instance. 
  at <AllHubs onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <RouterView> 
  at <Index onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <RouterView> 
  at <App>

javascript

laravel

vue.js

laravel-vue

0 Answers

Your Answer

Accepted video resources