Files
payload/test/admin/globals/NotInView.ts
Patrik b1d92c2bad feat: allows excluding entities from the nav sidebar / dashboard without disabling its routes (#9897)
### What?

Previously, the `admin.group` property on `collection` / `global`
configs allowed for a custom group and the `admin.hidden` property would
not only hide the entity from the nav sidebar / dashboard but also
disable its routes.

### Why?

There was not a simple way to hide an entity from the nav sidebar /
dashboard but still keep the entities routes.

### How?

Now - we've added the `false` type to the `admin.group` field to account
for this.

Passing `false` to `admin.group` will hide the entity from the sidebar
nav and dashboard but keep the routes available to navigate.

I.e

```
admin: {
  group: false,
},
```
2024-12-11 13:31:12 -05:00

17 lines
279 B
TypeScript

import type { GlobalConfig } from 'payload'
import { notInViewGlobalSlug } from '../slugs.js'
export const GlobalNotInView: GlobalConfig = {
slug: notInViewGlobalSlug,
admin: {
group: false,
},
fields: [
{
name: 'title',
type: 'text',
},
],
}