File tree Expand file tree Collapse file tree 4 files changed +17
-10
lines changed
Expand file tree Collapse file tree 4 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 3030.report
3131.agents
3232docs /plans
33+ docs /superpowers
3334CLAUDE.md
3435
3536# debug
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ export default function BasicDemo() {
2222 const portal = usePortal ( ) ;
2323
2424 usePositioner ( {
25- anchor : contextmenu . popover ?. state . anchorElement ,
26- content : contextmenu . popover ?. state . positionerElement ,
27- arrow : contextmenu . popover ?. state . arrowElement ,
25+ anchor : contextmenu . state . anchorElement ,
26+ content : contextmenu . state . positionerElement ,
27+ arrow : contextmenu . state . arrowElement ,
2828 sideOffset : 8 ,
2929 flip : true ,
3030 shift : true ,
@@ -33,8 +33,8 @@ export default function BasicDemo() {
3333 } ) ;
3434
3535 usePositioner ( {
36- anchor : viewSub . menusub ?. popover ?. state . anchorElement ,
37- content : viewSub . menusub ?. popover ?. state . positionerElement ,
36+ anchor : viewSub . menusub ?. state . anchorElement ,
37+ content : viewSub . menusub ?. state . positionerElement ,
3838 sideOffset : 0 ,
3939 flip : true ,
4040 shift : true ,
Original file line number Diff line number Diff line change @@ -19,7 +19,11 @@ export const useMenuSub = withHeadless({
1919 } , [ ] ) ;
2020
2121 const state = {
22- open : ! ! popover . state . open
22+ open : ! ! popover . state . open ,
23+ anchorElement : popover . state . anchorElement ,
24+ positionerElement : popover . state . positionerElement ,
25+ popupElement : popover . state . popupElement ,
26+ arrowElement : popover . state . arrowElement
2327 } ;
2428
2529 const toggle = ( ) => {
Original file line number Diff line number Diff line change @@ -42,7 +42,11 @@ export const useMenu = withHeadless({
4242 const state = {
4343 open : ! ! popover . state . open ,
4444 focused : focusedState ,
45- focusedOptionId
45+ focusedOptionId,
46+ anchorElement : popover . state . anchorElement ,
47+ positionerElement : popover . state . positionerElement ,
48+ popupElement : popover . state . popupElement ,
49+ arrowElement : popover . state . arrowElement
4650 } ;
4751
4852 const getItemId = React . useCallback (
@@ -607,9 +611,7 @@ export const useMenu = withHeadless({
607611
608612 if ( ! element ) return ;
609613
610- const level = getItemLevel ( element ) ;
611-
612- onItemClick ( event , props . composite ? false : level !== 0 , ! ! popover . state . open ) ;
614+ onItemClick ( event , false , ! ! popover . state . open ) ;
613615 }
614616
615617 event . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments