🐛(component): [dropdown]修复点击菜单项时只能关闭当前层级的问题
This commit is contained in:
parent
c00657554f
commit
f28d43f03e
@ -541,6 +541,11 @@ const handleFocusout = () => {
|
||||
hide();
|
||||
};
|
||||
|
||||
const handleContextHide = () => {
|
||||
hide();
|
||||
dropdownCtx?.hide();
|
||||
}
|
||||
|
||||
const addChildRef = (ref: any) => {
|
||||
childrenRefs.add(ref);
|
||||
dropdownCtx?.addChildRef(ref);
|
||||
@ -648,7 +653,7 @@ provide(
|
||||
onMouseleave: handleMouseLeaveWithContext,
|
||||
addChildRef,
|
||||
removeChildRef,
|
||||
hide,
|
||||
hide: handleContextHide,
|
||||
})
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user