problems with "yii2 export" to export to csv

I try to use from kartik-v: yii2-export (with the module grid)

Did not get to do the export setting (put delimiter, create your own name for the file);

On site:

written default settings:

"The default exportConfig is setup as below".

For their changes I write settings in a property: exportConfig in GridView.

No results are not present, the file is exported with the default settings. And the property itself "exportConfig" successfully parsed like widget GridView, by parseExportConfig.

Since I am suffering for about a day with this, I decided to tweak these settings, the "default", but it does not give (. Settings loaded unclear from where ((


use yii\helpers\Html;

use kartik\grid\GridView;

use kartik\export\ExportMenu;


$gridColumns = [

        ['class' => 'yii\grid\SerialColumn'],

        'idproduct',

        'name',

        'mainImg',

        ['class' => 'yii\grid\ActionColumn'],

    ];

 

    // Renders a export dropdown menu

    echo ExportMenu::widget([

        'dataProvider' => $dataProvider,

        'columns' => $gridColumns

    ]);


    GridView::widget([

        'dataProvider' => $dataProvider,

        'filterModel' => $searchModel,

        'columns' => $gridColumns,

        'exportConfig'=> [

            GridView::CSV=>[

                'label' => 'CSV',

                'icon' => '',

                'iconOptions' => '',

                'showHeader' => false,

                'showPageSummary' => false,

                'showFooter' => false,

                'showCaption' => false,

                'filename' => 'yii',

                'alertMsg' => 'created',

                'options' => ['title' => 'Semicolon -  Separated Values'],

                'mime' => 'application/csv',

                'config' => [

                    'colDelimiter' => ";",

                    'rowDelimiter' => "\r\n",

                ], 

            ],

        ],

    ]);  

Hi, I have problems with "yii2 export" to export!!! Not download files!!! Where the error files?

MODEL:


namespace app\models;

use Yii;

use yii\db\ActiveRecord;


class Users extends ActiveRecord { ... }

CONTROLLER:


namespace app\controllers;

use Yii;

use yii\web\Controller;

use yii\data\ActiveDataProvider;

use app\models\Users;

class AdministrationController extends \yii\web\Controller

{

...

public function actionSelectlist()

{

$dataProvider = new ActiveDataProvider([

'query' => Users::find(),

'pagination' => false,

]);

return $this->render('SelectList', [ 'dataProvider'=>$dataProvider ]);

}

...

}



VIEW:


use kartik\export\ExportMenu;

...

$dataProvider,

'columns' => [

['class' => 'yii\grid\SerialColumn'],

'id',

'name',

'email',

],

'fontAwesome' => true,

'dropdownOptions' => [

'label' => 'Download',

'class' => 'btn btn-primary'

],

]) ?>