Open hvanoch opened 2 years ago
Summary When exporting a datagrid, if the option hide: true is set, the export is empty for csv type. (an error is raised when using XLSX)
hide: true
Steps to reproduce Create a datagrid with options:
datagrids: [name]: options: toolbarOptions: pagination: hide: true export: true
Export the grid in csv format
Actual Result empty csv file
Expected Result records exported
Details about your environment
The reason why the file is empty is because $this->totalCount = $gridData->getTotalRecords(); returns 0 in src/Oro/Bundle/DataGridBundle/ImportExport/DatagridExportConnector.php method ensureSourceDataInitialized
$this->totalCount = $gridData->getTotalRecords();
src/Oro/Bundle/DataGridBundle/ImportExport/DatagridExportConnector.php
ensureSourceDataInitialized
Summary
When exporting a datagrid, if the option
hide: true
is set, the export is empty for csv type. (an error is raised when using XLSX)Steps to reproduce
Create a datagrid with options:
Export the grid in csv format
Actual Result empty csv file
Expected Result
records exported
Details about your environment
The reason why the file is empty is because
$this->totalCount = $gridData->getTotalRecords();
returns 0 insrc/Oro/Bundle/DataGridBundle/ImportExport/DatagridExportConnector.php
methodensureSourceDataInitialized