menu
menu copied to clipboard
fix:submenu overflow popupoffset
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:
https://github.com/react-component/menu/assets/73218815/851a744b-3415-4142-8fc4-777c85efb273
after fix:
https://github.com/react-component/menu/assets/73218815/b33cc2f3-e1cc-4fd0-a570-1046c6769ffd
And, some new test case is needed.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.58%. Comparing base (
4ae012f
) to head (57b5938
).
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
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
And, some new test case is needed.
i have no idea how to mock overflow
@zombieJ @yoyo837 When should this PR be expected in the release?
@zombieJ @yoyo837 When should this PR be expected in the release?
I haven't written the test yet, so you'll need to wait for me to finish writing it before they can review it.