Reputation: 1456
I need to filter the gridview as you type. By default it filters only when the enter key is pressed.
Upvotes: 6
Views: 3279
Reputation: 25312
You should handle this using your own js, e.g. :
$this->registerJs('$("body").on("keyup.yiiGridView", "#grid-id .filters input", function(){
$("#grid-id").yiiGridView("applyFilter");
})', \yii\web\View::POS_READY);
You should of course replace grid-id
with appropriate id.
Upvotes: 5