Majority of Dropdown Overlay Menu refactors.
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -4,7 +4,7 @@ import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { Dropdown, Menu, notification } from "antd";
|
||||
import { Dropdown, notification } from "antd";
|
||||
import { DownOutlined } from "@ant-design/icons";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
|
||||
@@ -37,19 +37,19 @@ export function JobAltTransportChange({ bodyshop, job }) {
|
||||
});
|
||||
}
|
||||
};
|
||||
const menu = (
|
||||
<Menu
|
||||
selectedKeys={[job && job.alt_transport]}
|
||||
onClick={onClick}
|
||||
items={[
|
||||
...(bodyshop.appt_alt_transport || []).map((alt) => ({
|
||||
|
||||
const menu = {
|
||||
items: [
|
||||
...(bodyshop.appt_alt_transport || []).map((alt) => ({
|
||||
key: alt,
|
||||
label: alt,
|
||||
})),
|
||||
{ key: "null", label: t("general.actions.clear") },
|
||||
]}
|
||||
/>
|
||||
);
|
||||
})),
|
||||
{ key: "null", label: t("general.actions.clear") },
|
||||
],
|
||||
onClick: onClick,
|
||||
defaultSelectedKeys: [job && job.alt_transport]
|
||||
}
|
||||
|
||||
return (
|
||||
<Dropdown menu={menu}>
|
||||
<a href=" #" onClick={(e) => e.preventDefault()}>
|
||||
|
||||
Reference in New Issue
Block a user