I’ve been struggling with the for several days and hoping someone can help me. It’s a little complex, so bare with me.
I have a main index page (members) that when you click on a record it opens the create/update views in a modal.
The modal has a tab control, on the 1st tab it displays the create/update form, on the 2nd it render another index (members-notes) and when you click on a record it opens the create/update views in a second modal.
both indexes are using Pjax and GridView.
My issue is that when the members-notes modal is closed and pjax reloads it doesn’t just refresh the index in the first modal as desired. Instead it closes the 1st modal and renavigates the main page.
I’ve been over the pjax Ids, check this and that and simply cannot see what I’m missing.
For instance the members-notes index page code looks like:
Pjax::begin(['id'=>'PjaxMembersNotes', 'timeout' => false, 'enablePushState' => false, 'formSelector' => '#MembersNotes']);
echo GridView::widget([
'id' => 'gridmembers-notes',
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
and then the form has
$.pjax.reload({container:'#PjaxMembersNotes', timeout:false, enablePushState:false}).fail(function() {console.log('Pjax reload failed');});
What am I missing?