Skip to content

Pagination doesn't work in I use it directly in laravel view #111

@vedmant

Description

@vedmant

Hi, I'm trying this package and have a problem with pagination, it doesn't show.

Here is my code:

<div>
  <vuetable ref="vuetable" :fields="['full_message', 'created_at', 'read_at']" api-url="{{ request()->url() }}"></vuetable>
  <vuetable-pagination ref="pagination"></vuetable-pagination>
</div>

It's inside blade template, not a vue component.

I added components to vue, they are loaded without errors:

Vue.component('vuetable', require('vuetable-2/src/components/Vuetable'))
Vue.component('vuetable-pagination', require('vuetable-2/src/components/VuetablePagination'))

It makes hxr request and gets following data:

current_page: 1
data: [{id: "942b804f-1f57-4c20-a091-b538b8fe798f", type: "App\Notifications\NewMessage",…},…]
first_page_url: "http://localhost:8000/account/notifications"
from: 1
last_page: 3
last_page_url: "http://localhost:8000/account/notifications?page=3"
next_page_url: "http://localhost:8000/account/notifications?page=2"
path: "http://localhost:8000/account/notifications"
per_page: "10"
prev_page_url: null
to: 10
total: 29

It renders table normally, but there is no pagination.

Package version is: 1.7.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions