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-links can't be used without its companion <paginate name="... #39

Closed
z1haze opened this issue Jan 27, 2017 · 6 comments
Closed

Comments

@z1haze
Copy link

z1haze commented Jan 27, 2017

I am paginating table rows but it seems the only place I can get the pagination links to be entered without showing the error in the title of this issue is if I put it in the tfoot.. this is no good because it makes the first column width span as wide as the pagination.

I have attempted to just place the pagination-links after the closing of the table, which it doesnt place them there and it does seem to work, but you I get this error message in the console. Please provide a fix for this.

@TahaSh
Copy link
Owner

TahaSh commented Jan 29, 2017

Hey! Thanks for filling this issue. Can you please show me some example where it doesn't work (using jsfiddle if possible). I tried to reproduce the issue, but couldn't.

@z1haze
Copy link
Author

z1haze commented Jan 29, 2017

Ok sure.

<table>
<paginate name="users-paginate" :list="users" :per="10" tag="tbody">
<tr v-for="user in paginated('users-paginate')">
 ....
</tr>
</paginate>
</table>
<paginate-links for="users-paginate"
                                :classes="{'ul': 'pagination'}"
                                :hide-single-page="true"
                ></paginate-links>

This is basically the setup. and i get

[vue-paginate]: <paginate-links for="users-paginate"> can't be used without its companion <paginate name="users-paginate"> 
(found in component <Users> at C:\projects\laravel-acl-demo\resources\assets\js\components\Users.vue)

@z1haze
Copy link
Author

z1haze commented Feb 1, 2017

any luck on this? all these console errors are killing me

@TahaSh
Copy link
Owner

TahaSh commented Feb 1, 2017

I don't think your issue is related to using the <table> element specifically. I think it's because you're using v-if either on your <table> or on one of its parents. If that's the case, don't worry as my next release will include a fix for it.

You can make sure this is the problem by replacing v-if with v-show, and if the issue stops happening, then it's the same issue I just mentioned; let me know, otherwise.

@z1haze
Copy link
Author

z1haze commented Feb 1, 2017

that was indeed the cause, you say you're going to fix that on the next release? good job this is a nice plugin

@TahaSh
Copy link
Owner

TahaSh commented May 18, 2017

Version 3.5.0 includes a better way to deal with this issue (check it out).

@TahaSh TahaSh closed this as completed May 18, 2017
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

2 participants