filament/filament
v3.2.116
v11.29.0
v3.5.12
PHP 8.2.22
When exporting data to CSV using Filament's Export action, the global sorting order is not maintained when the data is processed in chunks. This issue has been observed with PostgreSQL under these conditions:
modifyQueryUsing()
Importantly, the sorting works correctly when the chunk size is larger than the total number of records, confirming this is specifically a chunking issue rather than a general sorting problem.
Current workaround:
Additional context:
The issue appears to be related to how ORDER BY clauses are handled during chunked queries. The fact that the sorting works correctly when processing all records in a single chunk suggests that the chunking mechanism isn't properly maintaining the global sort order when splitting the data.
This affects all sorting methods available in Filament:
This might require either:
Environment:
The CSV export should maintain a consistent global sort order regardless of:
The chunking process should preserve the global ordering while still allowing for efficient processing of large datasets.
See ReadMe in Reproduction repository.
https://github.com/kaspernowak/filament-issue
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too