Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vedmant opened this issue Dec 7, 2018 · 2 comments
Open

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

vedmant opened this issue Dec 7, 2018 · 2 comments

Comments

@vedmant
Copy link

vedmant commented Dec 7, 2018

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

@ratiw
Copy link
Owner

ratiw commented Dec 17, 2018

@vedmant You'll need to set :pagination-path="".

@ShadowSpade
Copy link

I have the same issue, except that it renders the data, paginatinon meta, links and urls and has the buttons, but the next, prev buttons do not work. I have set :pagination-path=""

image

image

when i print the page onChnagePage it prints the correct page.

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants