Closed neoacevedo closed 8 months ago
In addition to this issue, if I set the emptyText
to the export menu as 'emptyText' => $dataProvider->count,
, the rendered file will display the total count for the dataProvider, and of course, it is >=1.
UPDATE: if in the template I set only 'template' => '{menu}',
the widget will never send the columns to render, so I must to let the template as the default column-menu because if I let only the menu in the template, the data won't be rendered. So, if I don't want the column selector and I want to get all the data in the files, how should I to do it?
I faced the same issue. This is due to the logic of GridView and ExportMenu - it is different. Changing the query in the dataProvider
allowed me to go further.
Check the dataProvider you pass to the GridView and ExportMenu - both are separate settings - and you control the query as part of your Search Model and the controller actions in your app. You need to setup the dataProvider query as per your use case - if you want to mirror the GridView and ExportMenu - ensure you pass the exact same modified dataProvider to both.
Prerequisites
master
branch of yii2-export.Steps to reproduce the issue
Expected behavior and actual behavior
The generated file only has the empty text message: "No results found".
The generated file should have at least the same data in the current grid view page.
Environment
Browsers
Operating System
Libraries
Isolating the problem