### 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,
},
```
17 lines
279 B
TypeScript
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',
|
|
},
|
|
],
|
|
}
|