import React, {Component} from "react";
import {Menu, Dropdown, Icon} from "antd";
const handleClick = () => {
console.log(this);
};
const menu = (
<Menu
onClick={handleClick}
onSelect={({item, key, selectedKeys}) => {
console.log(item);
console.log(key);
console.log(selectedKeys);
}}
>
<Menu.Item key={1}>
<a></a>
</Menu.Item>
<Menu.Item key={2}>
<a></a>
</Menu.Item>
<Menu.Item key={3}>
<a></a>
</Menu.Item>
</Menu>
);
export default class MoreAction extends Component {
state = {};
offLine = e => {
const {record} = this.props;
};
render() {
return (
<div>
<a onClick={this.offLine}></a> |{" "}
<Dropdown overlay={menu} onClick={handleClick}>
<a>
<Icon type="down" />
</a>
</Dropdown>
</div>
);
}
}
I think every Item can get the internal state of the component when it is clicked, but there are no events or methods that can be provided in antd"s dropdown. What should I do?