Skip to content

[Bug]: Dashboard - Countries table throws error when sorting #16017

Description

@andrewaltos

Package.json file

{
  "name": "@dtc/backend",
  "version": "0.0.1",
  "description": "A starter for Medusa projects.",
  "author": "Medusa (https://medusajs.com)",
  "license": "MIT",
  "keywords": [
    "sqlite",
    "postgres",
    "typescript",
    "ecommerce",
    "headless",
    "medusa"
  ],
  "scripts": {
    "predeploy": "medusa db:migrate",
    "build": "medusa build",
    "start": "medusa start",
    "dev": "medusa develop",
    "lint": "medusa lint",
    "test:integration:http": "TEST_TYPE=integration:http NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --forceExit",
    "test:integration:modules": "TEST_TYPE=integration:modules NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --forceExit",
    "test:unit": "TEST_TYPE=unit NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit"
  },
  "dependencies": {
    "@medusajs/admin-sdk": "2.17.2",
    "@medusajs/admin-shared": "2.17.2",
    "@medusajs/caching": "2.17.2",
    "@medusajs/cli": "2.17.2",
    "@medusajs/dashboard": "2.17.2",
    "@medusajs/draft-order": "2.17.2",
    "@medusajs/file-s3": "^2.17.2",
    "@medusajs/framework": "2.17.2",
    "@medusajs/js-sdk": "2.17.2",
    "@medusajs/medusa": "2.17.2",
    "@medusajs/ui": "~4.1.15",
    "@tanstack/react-query": "5.64.2",
    "react-i18next": "13.5.0",
    "react-router-dom": "~6.30.3",
    "zod": "4.2.0"
  },
  "devDependencies": {
    "@medusajs/test-utils": "2.17.2",
    "@swc/core": "^1.7.28",
    "@swc/jest": "^0.2.36",
    "@types/jest": "^29.5.13",
    "@types/node": "^20.12.11",
    "@types/react": "^18.3.2",
    "@types/react-dom": "^18.2.25",
    "jest": "^29.7.0",
    "prop-types": "^15.8.1",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "ts-node": "^10.9.2",
    "typescript": "^5.6.2",
    "vite": "^5.4.14",
    "yalc": "^1.0.0-pre.53"
  },
  "engines": {
    "node": ">=20"
  },
  "packageManager": "pnpm@10.32.1"
}

Node.js version

v24.11.1

Database and its version

PostgreSQL 18

Operating system name and version

Macos Tahoe 26.5.2

Browser name

Edge

What happended?

On Dashboard, when viewing the Countries table in a Region, clicking the sort option and selecting 'Name' or 'Code' throws an error.

Image Image

"The above error occurred in the <RegionCountrySection> component"

There is also a console log "The key ${key} is not a valid order key" which suggests string interpolation is not working as intended.

Expected behavior

I'm expecting no error to throw, and for the table to sort correctly by selected prop and direction

Actual behavior

An error throws and requires going back a page to recover. This happens on a starter repo.

Link to reproduction repo

https://github.com/medusajs/medusa-starter-default

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions