Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty export result when pagination is hidden in datagrid #1071

Open
hvanoch opened this issue Sep 1, 2021 · 0 comments
Open

Empty export result when pagination is hidden in datagrid #1071

hvanoch opened this issue Sep 1, 2021 · 0 comments

Comments

@hvanoch
Copy link

hvanoch commented Sep 1, 2021

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:

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

  • OroPlatform version: 4.2
  • PHP version: 7.4
  • Database (MySQL, PostgreSQL) version: MySql 8.0

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant