fix(dashboard): enable sorting by default based on apiColumn state (#14167)
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/dashboard": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Enable sorting by default based on the `apiColumn` state
|
||||||
@@ -69,7 +69,7 @@ export function useConfigurableTableColumns<TData = any>(
|
|||||||
column: apiColumn, // Store column metadata for future use
|
column: apiColumn, // Store column metadata for future use
|
||||||
},
|
},
|
||||||
enableHiding: apiColumn.hideable,
|
enableHiding: apiColumn.hideable,
|
||||||
enableSorting: false, // Disable sorting for all columns by default
|
enableSorting: apiColumn.sortable,
|
||||||
headerAlign, // Pass the header alignment to the DataTable
|
headerAlign, // Pass the header alignment to the DataTable
|
||||||
} as any)
|
} as any)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user