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