Skip to content
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

onVisibleChange is not fired when menu item is selected #132

Open
kkaaddff opened this issue Dec 8, 2020 · 1 comment
Open

onVisibleChange is not fired when menu item is selected #132

kkaaddff opened this issue Dec 8, 2020 · 1 comment

Comments

@kkaaddff
Copy link

kkaaddff commented Dec 8, 2020

onVisibleChange is not fired when menu item is selected
这个问题在现在的最新版中仍然存在
https://codesandbox.io/s/jiben-antd492-forked-jldb1?fontsize=14&hidenavigation=1&theme=dark

@kkaaddff
Copy link
Author

kkaaddff commented Dec 8, 2020

` const onClick = e => {
const { onOverlayClick } = props;
const overlayProps = getOverlayElement().props;
setTriggerVisible(false);

if (onOverlayClick) {
  onOverlayClick(e);
}
if (overlayProps.onClick) {
  overlayProps.onClick(e);
}

};

const onVisibleChange = (visible: boolean) => {
const { onVisibleChange } = props;
setTriggerVisible(visible);
if (typeof onVisibleChange === 'function') {
onVisibleChange(visible);
}
};`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant