Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Reload to page 1 while edit inline a row #869

Closed
CondonesMix opened this issue Jan 23, 2019 · 9 comments
Closed

Reload to page 1 while edit inline a row #869

CondonesMix opened this issue Jan 23, 2019 · 9 comments

Comments

@CondonesMix
Copy link

CondonesMix commented Jan 23, 2019

Hello,
(It's a suggestion)
When you edit in-line from any page, always reload the first page.

It is uncomfortable if you are on page 20 because to return to 20 you have to make several clicks.

I found the solution in datatablesbundle/Resources/views/column/column_post_create_dt.js.twig
(line 73)

Changing
success: function() { if (pipeline > 0) { oTable.clearPipeline().draw(); } else { oTable.draw(); } }
to
success: function() { if (pipeline > 0) { oTable.clearPipeline().draw(false); } else { oTable.draw(false); } }

maybe should be in the master, and if not, I expect that those who have the same uncomfortable problem that I have had serve them.

Greetings from Barcelona, and congratulations for the great work with this bundle, for me, a "must have"

@Seb33300
Copy link
Collaborator

Seb33300 commented Jan 23, 2019

Hola, can you submit a pull request for this?

@klupa-gotoma
Copy link

Was this fixed? Same problem I'm having.

@CondonesMix
Copy link
Author

Is fixed with my modif . (@Seb33300 I try to make PR, thanks)

@klupa-gotoma
Copy link

Where is this fix?

@CondonesMix
Copy link
Author

@klupa-gotoma read:

datatablesbundle/Resources/views/column/column_post_create_dt.js.twig
(line 73)

Changing
success: function() { if (pipeline > 0) { oTable.clearPipeline().draw(); } else { oTable.draw(); } }
to
success: function() { if (pipeline > 0) { oTable.clearPipeline().draw(false); } else { oTable.draw(false); } }

@klupa-gotoma
Copy link

of course it was the first thing I tried. Unfortunately, this file is not used at all (don't know why yet).
I thought maybe you solved it differently. Anyway, thank you for the answer.

@CondonesMix
Copy link
Author

@klupa-gotoma what version you have?

@klupa-gotoma
Copy link

1.0
I tried update to the newest, but it does not work - #945 same problem.

@klupa-gotoma
Copy link

I fixed this. the problem was not related to the bundle, but the way we reload ajax within the project:
was: table.DataTable().ajax.reload();
fix: table.DataTable().ajax.reload(null, false);

@stwe stwe closed this as completed Apr 5, 2021
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

4 participants