Это потому, что вы не завернули свою форму в
<?php Pjax::begin()?>
<?php Pjax::end()?>
и, следовательно, ваша страница перезагружается каждый раз, когда вы пытаетесь выполнить поиск, хотя результаты отображаются правильно.
Предоставление data-pjax=>1
для options
формы недостаточно, вам нужно хранить форму внутри begin()
и end()
разделов Pjax. Поэтому измените код на следующий.
<?php \yii\widgets\Pjax::begin();?>
<?php $form = ActiveForm::begin([
'options' => ['data-pjax' => true],
'action' => ['index'],
'method' => 'get',
]);?>
Approve month: <input type="string" name="approvemonth"><br><br>
Team: <input type="string" name="team"><br><br>
Difficulty: <input type="string" name="difficulty">
<div class="form-group">
<?=Html::submitButton('Search', ['class' => 'btn btn-primary'])?>
<?=Html::resetButton('Reset', ['class' => 'btn btn-default'])?>
</div>
<?php ActiveForm::end();?>
<?php echo GridView::widget([
'dataProvider' => $dataProvider15,
'filterModel' => true,
'pjax' => true,
'panel' => [
'type' => GridView::TYPE_PRIMARY,
'heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-user"></i>Avg total time by modeler without handover</h3>',
],
'columns' => [
[
'attribute' => 'approvemonth',
'filter' => Html::input('string', 'approvemonth'),
],
[
'attribute' => 'team',
'filter' => Html::input('string', 'team'),
// 'group' => true,
],
[
'attribute' => 'difficulty',
'filter' => Html::input('string', 'difficulty'),
// 'group' => true,
],
[
'attribute' => 'Total',
'format' => ['decimal', 2],
],
[
'attribute' => 'Avg',
'format' => ['decimal', 2],
],
],
]);
?>
<?php \yii\widgets\Pjax::end();?>