I am trying create ArrayDataProvider. I am calling dataProvider like this:
$dataProvider = new ArrayDataProvider([
'allModels' => $query->from('posts')->all(),
'pagination' => [
'pageSize' => 10,
],
]);
Here I am using pageSize. When I run this code in sql not showing LIMIT, but pagination is working. I have more than 100 posts and all of them loading in all time. Generated SQL Query: SELECT * FROMposts.
What I must do to solve this.
Thank you!
ActiveDataProviderinstead? - topher$allModelsis the data that is not paginated or sorted. You have to find some way of passing thepageSizeas alimiton the$query. - topher