Skip to content
Discussion options

You must be logged in to vote

Hey @shestakov2103 you might want to look into groupBy if you haven't yet! This enables grouping in the list view UI using findDistinct under the hood. It's marked as experimental, but it's the supported path.

With it you can do something like

// collections/MyCollection.ts
export const MyCollection: CollectionConfig = {
  slug: 'my-collection',
  admin: {
    groupBy: true,
  },
  fields: [
    { name: 'group', type: 'text' },
    // ...
  ],
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@shestakov2103
Comment options

Answer selected by zubricks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants