Files
payload/test/admin/collections/UploadTwo.ts
Patrik 7d2480aef9 fix(next): incorrect active state for partial matches of collection names in sidebar (#11511)
Previously, collections with similar names (e.g., `uploads` and
`uploads-poly`) both appeared active when viewing either collection.

This was due to `pathname.startsWith(href)`, which caused partial
matches.

This update refines the `isActive` logic to prevent partial matches.
2025-03-03 16:46:47 -05:00

15 lines
281 B
TypeScript

import type { CollectionConfig } from 'payload'
import { uploadTwoCollectionSlug } from '../slugs.js'
export const UploadTwoCollection: CollectionConfig = {
slug: uploadTwoCollectionSlug,
fields: [
{
name: 'title',
type: 'text',
},
],
upload: true,
}