this is working perfect. but, I want to globalize this pager setting
GridView::widget([
'dataProvider' => $dataProvider,
'pager' => [
'maxButtonCount' => 5,
'options' => [
'tag' => 'ul',
'class' => 'pagination pagination-sm',
]
],
'columns' => .....
]);
my code is this in component section. But, It is not working.
'components' => [
.....
'pager' => [
'class' => yii\widgets\LinkPager::class,
'maxButtonCount' => 5,
'options' => [
'tag' => 'ul',
'class' => 'pagination pagination-sm',
]
],
],
I found a solution to handle pagination button count globally
$config = [
....
'container' => [
'definitions' => [
'yii\widgets\LinkPager' => [
'maxButtonCount' => 6,
'options' => [
'tag' => 'ul',
'class' => 'pagination', //pagination-sm
]
],
],
],
'components' => [
...
],
];