FlowingCode / GridExporterAddon

Other
10 stars 8 forks source link

Exporter works unproperly with grids filtered by ListDataView #70

Closed brunoagretti closed 1 year ago

brunoagretti commented 1 year ago

If a grid is filtered using grid.getListDataView().addFilter(...), the exported grid will show the correct ammount of items, but will not show the filtered items (the items that passed the filter), rather it will show the first n items (even if they don't match the filter) of the grid.

Example having the following rows: row A row B row C Applying a filter criteria that leaves out row B: row A row C What ends up being exported (which is wrong) is: row A row B

To further show the behaviour of this issue, I attached a sample project in which I attempt something as shown above. grid-exporter-test.zip To test it, please:

  1. Import the project as a Maven project
  2. Run mvn install
  3. Run Application class
  4. Navigate to "/test".
  5. Add any filter, then export as xls or pdf.
brunoagretti commented 1 year ago

(Please take a look at the implementation of the TestView class)