yii2-widget-datatables icon indicating copy to clipboard operation
yii2-widget-datatables copied to clipboard

Using yii pagination

Open fedemotta opened this issue 9 years ago • 2 comments

After #2 It is necessary the implementation of a pagination in the php layer to avoid memory limit errors.

fedemotta avatar Aug 15 '15 15:08 fedemotta

I believe making it working like GridView (pagination and filters) will be great. Right now it loads all data with pagination being false and filters does not work as Yii2 GV.

Especially loading all data once forced me to rollback all uses of this extension (and datatables all together since this was the most compatible extension to GV).

I will try to fix when I have time (currently I don't have) but if you find time to fix it will be great!

mtangoo avatar Dec 30 '17 07:12 mtangoo

в модели

$dataProvider = new ActiveDataProvider([ 'query' => $query, 'pagination' => [ 'totalCount' => $query->count(), 'pageSize' => 10, ], ]);

$query->offset($dataProvider->pagination->offset)->limit($dataProvider->pagination->limit)->all();

gitartur avatar Jan 22 '19 10:01 gitartur