#Breadcrumbs Missing After Custom View Implementation?
37 messages · Page 1 of 1 (latest)
Original message from @slow lodge - Moved from #general message
Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
Documentation:
Hey @slow lodge
The useStepNav hook should work for you here in your custom view: https://payloadcms.com/docs/admin/react-hooks#usestepnav
The default list views use it here: https://github.com/payloadcms/payload/blob/main/packages/ui/src/views/List/index.tsx#L143-L151
Already tried it and unfortunately it's throwing error:
And the SetStepNav component doesn't work for you either?
not really
import CustomAnalytics from '@/components/CustomAnalytics'
import { BeforeOperationHook } from 'node_modules/payload/dist/collections/config/types'
import { CollectionConfig, PayloadComponent } from 'payload'
export const Analytics: CollectionConfig = {
slug: 'analytics',
admin: {
useAsTitle: 'title',
group: 'Workspace',
components: {
views: {
list: {
Component: '/components/CustomAnalytics',
},
},
},
},
fields: [
{
name: 'title',
type: 'text',
required: true,
admin: {
hidden: false,
},
},
],
}
also when I log nav object, I get undefined so I guess it might be connected to the problem
Yeah, not sure where you are pulling that nav from tbh
But it doesn't get automatically passed in
You should use the collection configs plural label
Or some other navItem[]
I think that's the issue here
I mean even if I manually set string as value, it still returns the same error for the setStepNav, that it's not a function...
Hmm, weird - what Payload version are you using?
3.0
The other guy that you managed to help was facing exactly same problem but for him SetStepNav component worked...
I mean what actual version? 3.0 has had a bunch of releases since launch
Do other hooks work for you?
Try useAuth
Just to test
3.35
@compact frigate fixed it, turns out I had version mismatch :))
It's my pleasure, truly

Glad your issue was resolved! :tada: If you want to help make payload better, please give us a :star: on GitHub and review us - It helps us a lot.