diff --git a/.changeset/khaki-pumas-fry.md b/.changeset/khaki-pumas-fry.md new file mode 100644 index 00000000000..8696b2e2428 --- /dev/null +++ b/.changeset/khaki-pumas-fry.md @@ -0,0 +1,11 @@ +--- +'@keystonejs/app-admin-ui': patch +--- + +Added a fix to navigate when the `Label` column is hidden in list page of admin UI. + +In the list page of admin UI, the `Label` column was used to open up the detailed view of a single item. +Thus, hiding the `Label` column was preventing the user to navigate to detailed view. + +This was happening because inside `ListTable`, the default value for `linkField` was set to `_label_`. +To fix this, we have now added the path of first field as default value to `linkField`. diff --git a/packages/app-admin-ui/client/components/ListTable.js b/packages/app-admin-ui/client/components/ListTable.js index ec55eb43884..d4979291fa7 100644 --- a/packages/app-admin-ui/client/components/ListTable.js +++ b/packages/app-admin-ui/client/components/ListTable.js @@ -331,7 +331,7 @@ export default function ListTable({ currentPage, filters, search, - linkField = '_label_', + linkField = fields[0].path, }) { const [sortBy, onSortChange] = useListSort();