IO-1886 Handle large numbers of of menu items for notes and file handler.

This commit is contained in:
Patrick Fic
2022-05-19 10:09:45 -07:00
parent e10ca9897c
commit abc7262584
4 changed files with 36 additions and 21 deletions

View File

@@ -22,9 +22,17 @@ export function NotesPresetButton({ bodyshop, form }) {
};
const menu = (
<Menu>
<Menu
style={{
columnCount: Math.floor(bodyshop.md_notes_presets.length / 10) + 1,
}}
>
{bodyshop.md_notes_presets.map((i, idx) => (
<Menu.Item onClick={() => handleSelect(i)} key={idx}>
<Menu.Item
onClick={() => handleSelect(i)}
key={idx}
style={{ breakInside: "avoid" }}
>
{i.label}
</Menu.Item>
))}