File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
packages/next/src/views/List/Default Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import { useWindowInfo } from '@payloadcms/ui/elements/WindowInfo'
22
22
import { SetViewActions } from '@payloadcms/ui/providers/Actions'
23
23
import { useComponentMap } from '@payloadcms/ui/providers/ComponentMap'
24
24
import { useConfig } from '@payloadcms/ui/providers/Config'
25
+ import { useEditDepth } from '@payloadcms/ui/providers/EditDepth'
25
26
import { useListInfo } from '@payloadcms/ui/providers/ListInfo'
26
27
import { useListQuery } from '@payloadcms/ui/providers/ListQuery'
27
28
import { useSearchParams } from '@payloadcms/ui/providers/SearchParams'
@@ -65,6 +66,8 @@ export const DefaultListView: React.FC = () => {
65
66
66
67
const { i18n } = useTranslation ( )
67
68
69
+ const drawerDepth = useEditDepth ( )
70
+
68
71
const { setStepNav } = useStepNav ( )
69
72
70
73
const {
@@ -83,12 +86,14 @@ export const DefaultListView: React.FC = () => {
83
86
}
84
87
85
88
useEffect ( ( ) => {
86
- setStepNav ( [
87
- {
88
- label : labels ?. plural ,
89
- } ,
90
- ] )
91
- } , [ setStepNav , labels ] )
89
+ if ( drawerDepth <= 1 ) {
90
+ setStepNav ( [
91
+ {
92
+ label : labels ?. plural ,
93
+ } ,
94
+ ] )
95
+ }
96
+ } , [ setStepNav , labels , drawerDepth ] )
92
97
93
98
return (
94
99
< div className = { baseClass } >
You can’t perform that action at this time.
0 commit comments