-
Notifications
You must be signed in to change notification settings - Fork 720
How to avoid having resources nested under Prisma in navigation? #1736
-
I'm just getting started with AdminJS using Express and Prisma. Following the docs for adding Prisma resources, my AdminJSOptions looks as follows:
const options: AdminJSOptions = { componentLoader, rootPath: '/admin', resources: [ { resource: { model: getModelByName('User'), client: prisma }, }, ], };
However, this results in the resource being nested under Prisma:
image
I can't figure out how to avoid this. I tried the instructions here, but this simply renames Prisma to something else.
Beta Was this translation helpful? Give feedback.
All reactions
- Nesting under some name:
navigation: { name: 'xxx' }
- Nesting under some name with icon (this is the default conifguration where name is usually your ORM):
navigation: { name: 'xxx', icon: 'Activity' }
- Not nesting under anything:
navigation: null- Not nesting but having an icon:
navigation: { icon: 'Activity' }
You can use PascalCase names of icons from: https://feathericons.com/
Replies: 1 comment 1 reply
-
- Nesting under some name:
navigation: { name: 'xxx' }
- Nesting under some name with icon (this is the default conifguration where name is usually your ORM):
navigation: { name: 'xxx', icon: 'Activity' }
- Not nesting under anything:
navigation: null- Not nesting but having an icon:
navigation: { icon: 'Activity' }
You can use PascalCase names of icons from: https://feathericons.com/
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks! Appreciate the quick the response :)
Though, I'm curious why the default behavior (aka without explicitly defining options or navigation) is equivalent to
navigation: { name: 'Prisma', // Adapter? icon: 'Archive', },
instead of defaulting to
navigation: nullBeta Was this translation helpful? Give feedback.