-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[DataGrid] Add new CSV export option: getRowsToExport
#3687
[DataGrid] Add new CSV export option: getRowsToExport
#3687
Conversation
getRowsToExport
These are the results for the performance tests:
|
@cherniavskii #3736 being merged, I updated the behavior to export the collapsed rows. I'm adding @joserodolfofreitas for the doc part |
@@ -14,6 +17,13 @@ export interface GridExportOptions { | |||
allColumns?: boolean; | |||
} | |||
|
|||
export interface GridCsvGetRowsToExportParams { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm only passing the apiRef
since most of the time users will want to use a selector, and selectors should be given the apiRef
instead of the state whenever possible after #3663.
Not sure if we want to pass anything else.
We could pass a callback to generate them (like getDefaultRowsToExport
), but the behavior is so simple right now that I'm not sure it would be very useful.
Anyway, I let the params as an object to be able to add things later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how powerful the getRowsToExport method is. But I'm not sure we should use it to address the export without groups from row grouping.
I'd leave the current example for now, but replace it soon with an easier way to handle this case. Something like "disableRowGrouping". What do you think?
I'll then open a new issue for it.
Co-authored-by: José Rodolfo Freitas <joserodolfo.freitas@gmail.com>
Co-authored-by: José Rodolfo Freitas <joserodolfo.freitas@gmail.com>
Co-authored-by: José Rodolfo Freitas <joserodolfo.freitas@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's looking great!
Just one more point about the default exported rows.
Co-authored-by: José Rodolfo Freitas <joserodolfo.freitas@gmail.com>
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Closes #3610
getRowsToExport
method toGridCsvExportOptions