Majority of Dropdown Overlay Menu refactors.
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { DownOutlined } from "@ant-design/icons";
|
||||
import { Dropdown, Menu } from "antd";
|
||||
import { Dropdown } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -21,22 +21,21 @@ export function JoblinePresetButton({ bodyshop, form }) {
|
||||
form.setFieldsValue(item);
|
||||
};
|
||||
|
||||
const menu = (
|
||||
<Menu
|
||||
style={{
|
||||
columnCount: Math.max(
|
||||
Math.floor(bodyshop.md_jobline_presets.length / 15),
|
||||
1
|
||||
),
|
||||
}}
|
||||
items={bodyshop.md_jobline_presets.map((i, idx) => ({
|
||||
key: idx,
|
||||
label: i.label,
|
||||
style: { breakInside: "avoid" },
|
||||
onClick: () => handleSelect(i),
|
||||
}))}
|
||||
/>
|
||||
);
|
||||
|
||||
const menu = {
|
||||
items: bodyshop.md_jobline_presets.map((i, idx) => ({
|
||||
key: idx,
|
||||
label: i.label,
|
||||
style: { breakInside: "avoid" },
|
||||
onClick: () => handleSelect(i),
|
||||
})),
|
||||
style: {
|
||||
columnCount: Math.max(
|
||||
Math.floor(bodyshop.md_jobline_presets.length / 15),
|
||||
1
|
||||
),
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user