Closed re1naldo closed 9 years ago
make sure the different pagination widgets dont conflict. You can use the pageParam http://www.yiiframework.com/doc-2.0/yii-data-pagination.html#$pageParam-detail
If that doesnt work, please use 2 Yii2 grids . If that does work, its beyond the scope of this issuetracker and perhabs ask @kartik-v at his forum.
Solved by setting route and param of pagination:
$dataProvider = new ActiveDataProvider([
'query' => $query,
'pagination' => [
'route' => '...',
'params' => $params
]
]);
When there are multiple Pjax in 1 page, it seems the generated pagination URL follows the current URL.
@dynasource Thanks for your suggestion!
I have a grid that displays certain data. Each row of that grid can be expanded to display child grids (products, goods, etc.) which are related to that grid:
All grids use Pjax and most features (sorting, updating, deleting) usually works fine after I set
linkSelector
of Pjax. However, pagination of child grids seemed to be broken. If I clicked different page, it refreshed the whole page and added pagination to the parent grid.Parent grid (using Grid from kartik):
Child grid (using default GridView):
Did I do anything wrong? Was the pagination broken because of nested Pjax? I tried to use
renderAjax
instead ofrenderPartial
when rendering child grids, but it broke the whole page.