From 4ab6508324bd57ae1574c7b322d35e54f07bdfc3 Mon Sep 17 00:00:00 2001 From: Eremin Michael Date: Thu, 16 Aug 2018 18:57:59 +0500 Subject: [PATCH] Improve to get all attributes from model for export --- components/Crud.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Crud.php b/components/Crud.php index f4bd951..5189dfc 100644 --- a/components/Crud.php +++ b/components/Crud.php @@ -1062,7 +1062,7 @@ public function export(CrudExportForm $model) 'renderData' => (bool)$model->renderData, 'model' => $this->getModel('search'), 'dataProvider' => $this->getDataProvider(), - 'columns' => $this->getConfig('exportColumns', $this->guessColumns($this->getFields())), + 'columns' => $this->getConfig('exportColumns', $this->getModel()->getAttributes()), ]); return $exporter->export(); }