- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 260
fix:submenu overflow popupoffset #690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix:submenu overflow popupoffset #690
Conversation
| internalPopupClose={len === 0} | ||
| popupClassName={overflowedIndicatorPopupClassName} | ||
| popupOffset={overflowPopupOffset || [10, 15]} | ||
| > | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the default value this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i refer rc-menu docs's demo
if not, what value is appropriate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| And, some new test case is needed. | 
| Codecov ReportAll modified and coverable lines are covered by tests ✅ 
 Additional details and impacted files@@           Coverage Diff           @@
##           master     #690   +/-   ##
=======================================
  Coverage   99.58%   99.58%           
=======================================
  Files          27       27           
  Lines         721      722    +1     
  Branches      196      199    +3     
=======================================
+ Hits          718      719    +1     
  Misses          3        3           ☔ View full report in Codecov by Sentry. | 
| forceSubMenuRender?: boolean; | ||
| triggerSubMenuAction?: TriggerSubMenuAction; | ||
| builtinPlacements?: BuiltinPlacements; | ||
| overflowPopupOffset?: number[] | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a functional and naming standard, should this be provided? @MadCcc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i refer from this
Line 30 in 4ae012f
| popupOffset?: number[]; | 
| 
 i have no idea how to mock overflow | 
ref: #668
background
When we set the popupOffset, we expect all submenus to have an offset from the menu item. However, when the window width is small, the menu overflows. The overflow, represented by ... as an overflow placeholder, does not have a submenu offset.
It is necessary to fix it
before fix:
menu.mov
after fix:
menu.mov