Skip to content

[Admin] Return Reasons list uses legacy _DataTable, missing search/sort unlike Refund Reasons #14812

@emelladogomez

Description

@emelladogomez

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

  1. Open the admin dashboard
  2. Navigate to Settings > Return Reasons — no search bar, no column sorting
  3. 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

  • Medusa version: 2.13.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions