Bug Report
Description
The Return Reasons settings page uses the legacy _DataTable component with noHeader: true, which hides search and lacks sorting. The Refund Reasons page uses the newer DataTable component with full search, sorting, and empty state support. These two very similar pages have inconsistent UX.
Steps to Reproduce
- Open the admin dashboard
- Navigate to Settings > Return Reasons — no search bar, no column sorting
- Navigate to Settings > Refund Reasons — has search bar, column sorting, and proper column headers
Expected Behavior
Return Reasons should have the same table features as Refund Reasons: search, column sorting, column headers, and empty state messages.
Actual Behavior
Return Reasons uses the legacy _DataTable with noHeader: true, resulting in:
- No search functionality visible
- No column sorting
- No column headers (value and label are displayed without labels)
- No empty state messages
Location
Return Reasons (legacy):
packages/admin/dashboard/src/routes/return-reasons/return-reason-list/components/return-reason-list-table/return-reason-list-table.tsx — uses _DataTable from components/table/data-table
packages/admin/dashboard/src/hooks/table/columns/use-return-reason-table-columns.tsx — uses createColumnHelper from @tanstack/react-table (no sorting, no headers)
Refund Reasons (current):
packages/admin/dashboard/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/refund-reason-list-table.tsx — uses DataTable from components/data-table
packages/admin/dashboard/src/hooks/table/columns/use-refund-reason-table-columns.tsx — uses createDataTableColumnHelper from @medusajs/ui (with sorting, headers)
Suggested Fix
Migrate Return Reasons to use the same DataTable component and createDataTableColumnHelper pattern used by Refund Reasons.
Environment
Bug Report
Description
The Return Reasons settings page uses the legacy
_DataTablecomponent withnoHeader: true, which hides search and lacks sorting. The Refund Reasons page uses the newerDataTablecomponent with full search, sorting, and empty state support. These two very similar pages have inconsistent UX.Steps to Reproduce
Expected Behavior
Return Reasons should have the same table features as Refund Reasons: search, column sorting, column headers, and empty state messages.
Actual Behavior
Return Reasons uses the legacy
_DataTablewithnoHeader: true, resulting in:Location
Return Reasons (legacy):
packages/admin/dashboard/src/routes/return-reasons/return-reason-list/components/return-reason-list-table/return-reason-list-table.tsx— uses_DataTablefromcomponents/table/data-tablepackages/admin/dashboard/src/hooks/table/columns/use-return-reason-table-columns.tsx— usescreateColumnHelperfrom@tanstack/react-table(no sorting, no headers)Refund Reasons (current):
packages/admin/dashboard/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/refund-reason-list-table.tsx— usesDataTablefromcomponents/data-tablepackages/admin/dashboard/src/hooks/table/columns/use-refund-reason-table-columns.tsx— usescreateDataTableColumnHelperfrom@medusajs/ui(with sorting, headers)Suggested Fix
Migrate Return Reasons to use the same
DataTablecomponent andcreateDataTableColumnHelperpattern used by Refund Reasons.Environment