mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 15:45:24 +02:00
fix: export Excel data in same order as on-screen sorted view
Changed from filteredRows to sortedRows to preserve current sort order in export
This commit is contained in:
@@ -146,8 +146,8 @@ const WeeklyGrid: React.FC<WeeklyGridProps> = ({ data }) => {
|
|||||||
|
|
||||||
// Export to Excel
|
// Export to Excel
|
||||||
const handleExportExcel = () => {
|
const handleExportExcel = () => {
|
||||||
// Prepare data for export
|
// Prepare data for export - use sortedRows to match on-screen order
|
||||||
const exportData = filteredRows.map(row => {
|
const exportData = sortedRows.map(row => {
|
||||||
const rowData: { [key: string]: string | number } = {
|
const rowData: { [key: string]: string | number } = {
|
||||||
SKU: row.sku,
|
SKU: row.sku,
|
||||||
ASIN: row.asin,
|
ASIN: row.asin,
|
||||||
|
|||||||
Reference in New Issue
Block a user