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 and ajax bug #1012

Open
vialcollet opened this issue Jun 20, 2018 · 4 comments
Open

Pagination and ajax bug #1012

vialcollet opened this issue Jun 20, 2018 · 4 comments

Comments

@vialcollet
Copy link

Hi there
I have a weird case with my Pagerfanta pagination. Here are two cases:

Case 1: directly switch to another page
The request doesn't appear as an ajax call and therefore my entire page is reloaded.

$request = Request::createFromGlobals();
$ajax = $request->isXmlHttpRequest(); // returns false

Case 2: Use any filter in the grid and then use pagination
In this case the pagination call is seen as an ajax request and only my grid is reloaded.

$request = Request::createFromGlobals();
$ajax = $request->isXmlHttpRequest(); // returns true

Is there a missing piece with Pagerfanta?

@vialcollet
Copy link
Author

I found the issue.
Filters have events listeners attached to their elements. But Reset button and Pagerfanta are managed by JQuery selectors. As Jquery was loaded in the footer this was causing the issue until the grid is reloaded while Jquery was available.

What could be done in order to avoid this? It's a common practice to load Jquery in the footer.

@DonCallisto
Copy link
Member

DonCallisto commented Jun 21, 2018

@vialcollet if you have any idea, feel free to contribute on this project. As you can see, I'm alone here and I have no time to follow this project under this conditions (doing it all by myself seems like a huge mountain to overtake)

@vialcollet
Copy link
Author

Well I actually have no idea... :(
Let's close for now as this is a very acceptable workaround.

@DonCallisto
Copy link
Member

Let’s keep it open, is still an issue

@DonCallisto DonCallisto reopened this Jun 21, 2018
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