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

Allow to change context in a pjax:beforeReplace handler #431

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AntonTyutin
Copy link

No description provided.

@mislav
Copy link
Collaborator

mislav commented Sep 4, 2014

What's the use case?

Also, this requires tests.

@AntonTyutin AntonTyutin force-pushed the change_context_on_beforereplace branch from c68cf82 to 437ad6c Compare September 5, 2014 05:07
@AntonTyutin
Copy link
Author

Hi, @mislav

My use case is: when popup form was successfully submitted the server returns a content which used to refresh the "main" container (redirect-to-list in no-pjax scenario). I can detect this outcome in pjax:beforeReplace event handler and substitute the target context.

I've appended a test to a previous commit.

@jspizziri
Copy link

@mislav and @AntonTyutin the pull request I have proposed here #428 I believe satisfies the needs of both.

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

Successfully merging this pull request may close these issues.

4 participants