Answer the question
In order to leave comments, you need to log in
YII2 and pjax. How to update one pjax after another is running?
The page has a Listvew wrapped in Pjax[id = list-pjax] .
There is also a modal window Modal[id = my-modal] , inside which there is a form wrapped in another Pjax[id=form-pjax] .
It also has the following javascript:
$('#form-pjax').on('pjax:end', function(){
$('#my-modal').modal('hide');
$.pjax.reload('#list-pjax');
});
Answer the question
In order to leave comments, you need to log in
Try to use in place Pjax , AjaxCreate
This widget just helps to work with small forms in a modal window. After the form has successfully saved, it reloads its container.
The only thing you have to change is Widget::$autoIdPrefix = 'x';
because the id of some blocks in the modal window may overlap with those that are already on the page and js will not always work correctly.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question