I try using pjax and filter grid data but I would like to have one search field before a grid, not a standard grid filter field after header row. I wrote the code like below. It work’s but all requests clear my input field and URL is longer and longer with the same parameter from first request.
something like this:
?MailingListSearch[name]=lista1&MailingListSearch[name]=lista2&_pjax=%23grid-pajax&MailingListSearch[name]
Pjax::begin(
[
'timeout'=>999999,
'id'=>'grid-pajax'
]
);
$form = ActiveForm::begin([
'method' => 'get',
'options' => ['data-pjax' => '1'],
]
);
echo Html::tag('div',Html::input('text','MailingListSearch[name]',null,
['id'=>'gridFinder','class'=>'form-control']),['class'=>'left']);
?>
<div class="form-group center">
<?= Html::submitButton('Find')?>
</div>
<?php
ActiveForm::end();
echo GridView::widget([...])
Pjax::end();
?>