Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Possible Bug with "Per Page" filter #83

Open
xrayin opened this issue Aug 19, 2022 · 3 comments
Open

Possible Bug with "Per Page" filter #83

xrayin opened this issue Aug 19, 2022 · 3 comments

Comments

@xrayin
Copy link

xrayin commented Aug 19, 2022

Dear Devs,

First off thank you very much for this package, it has been fun learning to implement this.
I am relatively new with VUE.

I successfully implemented your package, with Vite.

Everything works so far, and I am using version: ^2.1.0

Only thing that I have encountered so far that I haven't been able to solve and I think might be a bug is the "Per Page" filter left below.
When you select other default options such as 30, 50 or 100, it won't show that many items per page. It always remains on 15.

When you use function ->perPageOptions([]) in the controller then the per page 15 default option still remains, even though you have given an empty array.

Thank you and apologies if this happens to be incorrect.

offtopic: is there an default option to keep the default CSS but implement your own table, head and body structure?

@heymerridew
Copy link

heymerridew commented Sep 2, 2022

Hi, I hope this can help you 🙂
Just place request(perPage) in the paginate option.

$users = QueryBuilder::for(User::class)
->defaultSort('name')
->allowedSorts(['name', 'email', 'language_code'])
->allowedFilters(['name', 'email', 'language_code', $globalSearch])
->paginate(request('perPage'))
->withQueryString();

@xrayin
Copy link
Author

xrayin commented Sep 12, 2022

@heymerridew Thank you for the solution.

@mbeckerle-xqueue
Copy link

Please mark as closed

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

No branches or pull requests

3 participants