Antd 4.24.x compatibility updates => Menu fixes.

This commit is contained in:
Patrick Fic
2023-01-17 19:14:31 -08:00
parent 713b3f4f6d
commit ef290e79b1
24 changed files with 1118 additions and 1008 deletions

View File

@@ -16,19 +16,15 @@ const mapDispatchToProps = (dispatch) => ({
});
export function ChatPresetsComponent({ bodyshop, setMessage, className }) {
const menu = (
<Menu>
{bodyshop.md_messaging_presets.map((i, idx) => (
<Menu.Item onClick={() => setMessage(i.text)} key={idx}>
{i.label}
</Menu.Item>
))}
</Menu>
);
const menu = bodyshop.md_messaging_presets.map((i, idx) => ({
label: i.label,
key: idx,
onClick: () => setMessage(i.text),
}));
return (
<div className={className}>
<Dropdown trigger={["click"]} overlay={menu}>
<Dropdown trigger={["click"]} menu={{ items: menu }} placement="top">
<PlusCircleOutlined />
</Dropdown>
</div>