fedemotta / yii2-widget-datatables

DataTables widget for Yii2
MIT License
35 stars 28 forks source link

records limit as 20 #2

Closed tehnn closed 9 years ago

tehnn commented 9 years ago

Why the records are limit at 20?

fedemotta commented 9 years ago

@tehnn Because it is default value in the dataProvider.

It is possible to disable pagination in your search method like this:

$dataProvider = new ActiveDataProvider([
            'query' => $query,
            'pagination' => false,
        ]);

I am not sure to use pagination disabled by default. It could lead to slow queries. What do you think?

tehnn commented 9 years ago

Thank you. It 's solved.

fedemotta commented 9 years ago

@tehnn See ee0c70a038302ca414fe01d51732ed217efdc772. No need to add the pagination=>false anymore.

Filter, sort and pagination is being handled by DataTables in the JS layer now.