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

Override CSV export #139

Open
sveinnetnordic opened this issue Sep 10, 2024 · 3 comments
Open

Override CSV export #139

sveinnetnordic opened this issue Sep 10, 2024 · 3 comments

Comments

@sveinnetnordic
Copy link

Feature proposal

I could not find a way to override the export in the class CsvInputStreamFactory, so I had to modify the code. Hope my code will show what I mean:
image
image

Describe solution expectations

No response

Additional information

Vaadin 24.4.10, GridExporterAddon 2.3.2

@github-project-automation github-project-automation bot moved this to Inbox (needs triage) in Flowing Code Addons Sep 10, 2024
@javier-godoy
Copy link
Member

It order to support this use case we could move new CSVWriter(os) to a protected method (so that you don't have to rewrite accept just for that), and make buildRow protected too (so that you can override it), as well as making CsvStreamResourceWriter and BaseStreamResourceWriter public classes.

@sveinnetnordic
Copy link
Author

I think that is a good solution. The only missing thing then will be:
// writer.writeNext(headers);

@javier-godoy
Copy link
Member

Created #149 as an epic to address various refactors necessary to enable this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Inbox (needs triage)
Development

No branches or pull requests

2 participants