FlowingCode / GridExporterAddon

Apache License 2.0
10 stars 9 forks source link

Double click results in two downloads #126

Closed javier-godoy closed 3 weeks ago

javier-godoy commented 3 months ago

Describe the bug

Clicking the download button twice results in two downloads (even if the first download hasn't completed).

Expected behavior

Clicking the download button while the download is in progress should not cause a new download to be started.

Minimal reproducible example

  1. Go to https://addonsv24-staging.flowingcode.com/gridexporter/bigdataset and double click the PDF button.
  2. First, a PDF will be downloaded
  3. Then, a second PDF will be downloaded

Add-on Version

2.3.3-SNAPSHOT

Vaadin Version

24.3.13

Additional information

No response

sveinnetnordic commented 3 weeks ago

I need to empty the Grid after download. Could not find an event nor a callback for that, so I had to modify the code and added a callback here: https://github.com/FlowingCode/GridExporterAddon/blob/ec5d5ad7bda3d1509a95c3af7a2daac17b3c7521/src/main/java/com/flowingcode/vaadin/addons/gridexporter/CsvInputStreamFactory.java#L89. I think this issue can be used instead?