diff --git a/.changeset/trash-locale-filter.md b/.changeset/trash-locale-filter.md new file mode 100644 index 0000000000..204239fd59 --- /dev/null +++ b/.changeset/trash-locale-filter.md @@ -0,0 +1,8 @@ +--- +"emdash": patch +"@emdash-cms/admin": patch +--- + +Fixes the admin Trash tab on multilingual sites, where it listed trashed entries from every locale regardless of the locale picker. Trash now follows the same locale filter as the All tab and shows a Locale column, so switching locales narrows the trash to that locale's entries. + +`GET /_emdash/api/content/{collection}/trash` accepts an optional `locale` query parameter to scope the listing, and each item in the response now carries `locale` and `translationGroup`. Omitting `locale` still returns every locale, so existing API callers are unaffected. diff --git a/packages/admin/src/components/ContentList.tsx b/packages/admin/src/components/ContentList.tsx index 0daf6f26c7..5231586a28 100644 --- a/packages/admin/src/components/ContentList.tsx +++ b/packages/admin/src/components/ContentList.tsx @@ -405,6 +405,7 @@ export function ContentList({ }; const colSpan = (i18n ? 5 : 4) + listColumns.length + extensionColumns.length + (bulkEnabled ? 1 : 0); + const trashColSpan = i18n ? 4 : 3; return (