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

Add data param to exportCSV method on DataTable #1845

Closed
atach opened this issue Dec 5, 2021 · 1 comment
Closed

Add data param to exportCSV method on DataTable #1845

atach opened this issue Dec 5, 2021 · 1 comment
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@atach
Copy link

atach commented Dec 5, 2021

By default, only the data that is in the "value" model itself is exported.
How to export all data. Not only those that are rendered, but all that exist on the server?

Is it possible to export an array for function exportCSV()?

Vue version: 3.2.23
PrimeVue version: 3.9.1
Browser: all

@mertsincan mertsincan self-assigned this Dec 6, 2021
@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Dec 6, 2021
@mertsincan mertsincan added this to the 3.10.0 milestone Dec 6, 2021
@mertsincan mertsincan changed the title Export all data with using "lazy" in DataTable component Add data param to exportCSV method on DataTable Dec 6, 2021
@mertsincan
Copy link
Member

Hi,

You can use exportCSV method with custom data.

   /**
     * Exports the data to CSV format.
     * @param {DataTableExportCSVOptions} [options] - Export options.
     * @param {Object[]} [data] - Custom exportable data. This param can be used on lazy dataTable.
     */
    exportCSV: (options?: DataTableExportCSVOptions, data?: any[]) => void;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants