Repository navigation
fix: keep hover callbacks firing on disabled items - #903
officialasishkumar wants to merge 1 commit into
Conversation
Disabled MenuItem/SubMenu title dropped onMouseEnter/onMouseLeave entirely, so wrappers such as tooltips could not detect hover on them. Always forward the callbacks, while still skipping the active-key updates for disabled entries. Clicks and keyboard remain blocked.
|
@officialasishkumar is attempting to deploy a commit to the afc163's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. Walkthrough禁用菜单项现在会设置鼠标进入和离开处理器,并调用对应的悬停回调。活动状态仍只会在菜单项未禁用时更新。新增测试验证回调参数及激活类状态。 Changes禁用菜单项悬停行为
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk:
|
Fixes #436
Disabled
Menu.Item(and disabledSubMenutitles) droppedonMouseEnter/onMouseLeaveentirely, so wrapping components such as tooltips could not detect hover on them.useActivenow always forwards the hover callbacks, and only skips the active-key updates (onActive/onInactive) when disabled. Click and keyboard handling stay blocked, and disabled items still never get the active class.Added a test in
tests/MenuItem.spec.tsxthat fails without the change; the full suite passes.Summary by CodeRabbit