kartik-v / yii2-export

A library to export server/db data in various formats (e.g. excel, html, pdf, csv etc.)
http://demos.krajee.com/export
Other
165 stars 126 forks source link

fix the loss of the first page if batchSize #309

Closed onmotion closed 4 years ago

onmotion commented 4 years ago

Scope

This pull request includes a

Changes

The following changes were made (this change is also documented in the change log):

Related Issues

If this is related to an existing ticket, include a link to it as well.

If use the batchSize parameter it redefine pagination pagesize. But in first (while it is not set yet) in https://github.com/kartik-v/yii2-export/blob/19483fdc69d427966ffb80c8ea5283c1be2036f9/src/ExportMenu.php#L1782 the default pagesize models are requested and stored up into _models (var cache), so without the $forcePrepare param we loosing first page

image

Loss step:

image