File tree 1 file changed +8
-4
lines changed
packages/clay-core/src/vertical-nav
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ function VerticalNav<T extends Record<string, any> | string>({
155
155
} : Props < T > ) {
156
156
const [ isOpen , setIsOpen ] = useState ( false ) ;
157
157
158
- const containerRef = useRef < HTMLDivElement | null > ( null ) ;
158
+ const containerRef = useRef < HTMLUListElement | null > ( null ) ;
159
159
160
160
const [ expandedKeys , setExpandedKeys ] = useControlledState ( {
161
161
defaultName : 'defaultExpandedKeys' ,
@@ -245,7 +245,13 @@ function VerticalNav<T extends Record<string, any> | string>({
245
245
} , [ active , items ] ) ;
246
246
247
247
const content = (
248
- < Nav aria-orientation = "vertical" nested role = "menubar" >
248
+ < Nav
249
+ { ...navigationProps }
250
+ aria-orientation = "vertical"
251
+ nested
252
+ ref = { containerRef }
253
+ role = "menubar"
254
+ >
249
255
< VerticalNavContext . Provider
250
256
value = { {
251
257
activeKey :
@@ -295,11 +301,9 @@ function VerticalNav<T extends Record<string, any> | string>({
295
301
</ CustomTrigger >
296
302
297
303
< div
298
- { ...navigationProps }
299
304
className = { classNames ( 'collapse menubar-collapse' , {
300
305
show : isOpen ,
301
306
} ) }
302
- ref = { containerRef }
303
307
>
304
308
{ content }
305
309
</ div >
You can’t perform that action at this time.
0 commit comments