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

@@ -37,18 +37,19 @@ export function JobAltTransportChange({ bodyshop, job }) {
});
}
};
const menu = (
<Menu selectedKeys={[job && job.alt_transport]} onClick={onClick}>
{bodyshop.appt_alt_transport &&
bodyshop.appt_alt_transport.map((alt) => (
<Menu.Item key={alt}>{alt}</Menu.Item>
))}
<Menu.Divider />
<Menu.Item key={"null"}>{t("general.actions.clear")}</Menu.Item>
</Menu>
);
const menu = [
...(bodyshop.appt_alt_transport &&
bodyshop.appt_alt_transport.map((alt) => ({
key: alt,
label: alt,
value: alt,
onClick,
}))),
{ type: "divider" },
{ key: "null", label: t("general.actions.clear"), onClick },
];
return (
<Dropdown overlay={menu}>
<Dropdown menu={{ items: menu }}>
<a href=" #" onClick={(e) => e.preventDefault()}>
<DownOutlined />
</a>