import React from "react"; import styles from "./index.less"; import { Menu, Dropdown } from "antd"; import { DownOutlined } from "@ant-design/icons"; class OverlayVisible extends React.Component { state = { visible: false }; handleMenuClick = e => { if (e.key === "3") { this.setState({ visible: false }); } }; handleVisibleChange = flag => { this.setState({ visible: flag }); }; render() { const menu = ( Clicking me will not close the menu. Clicking me will not close the menu also. Clicking me will close the menu. ); return ( e.preventDefault()}> Hover me ); } } export default () => (
);