diff --git a/CHANGELOG.md b/CHANGELOG.md index d063f79dc..3cc26b4a1 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,9 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). In order to read more about upgrading and BC breaks have a look at the [UPGRADE Document](UPGRADE.md). -## 4.3.2 +## 4.3.2 (13. April 2022) ++ [#710](https://github.com/luyadev/luya-module-admin/pull/710) Fixed a bug where it was not possible to export more then 100 rows when using `ngRestExport()` configuration. + [#709](https://github.com/luyadev/luya-module-admin/pull/709) Added `initvalue` for `zaaColor` element. + [#707](https://github.com/luyadev/luya-module-admin/pull/707) Fix issue when creating a new record inside an ngrest relation call form, losing they context data (from the relation). diff --git a/src/ngrest/base/Api.php b/src/ngrest/base/Api.php index 9463328c3..9ab0a8116 100644 --- a/src/ngrest/base/Api.php +++ b/src/ngrest/base/Api.php @@ -869,15 +869,17 @@ private function formatExportValues(ActiveQuery $query, array $formatter) { Yii::$app->formatter->nullDisplay = ''; $data = []; + $rowId = 0; foreach ($query->batch() as $batch) { - foreach ($batch as $key => $model) { + foreach ($batch as $model) { foreach ($formatter as $formatterAttribute => $formatAs) { if (is_callable($formatAs)) { - $data[$key][$formatterAttribute] = call_user_func($formatAs, $model); + $data[$rowId][$formatterAttribute] = call_user_func($formatAs, $model); } else { - $data[$key][$formatterAttribute] = Yii::$app->formatter->format($model[$formatterAttribute], $formatAs); + $data[$rowId][$formatterAttribute] = Yii::$app->formatter->format($model[$formatterAttribute], $formatAs); } } + $rowId++; } }