From 179db3735bfa492da7dac533e8f6e564c4085e43 Mon Sep 17 00:00:00 2001 From: Volker Theile Date: Wed, 13 Sep 2023 13:00:43 +0200 Subject: [PATCH] Add divider to menu Signed-off-by: Volker Theile --- src/components/DropOption/DropOption.js | 3 +++ src/routes/objectStorage/ObjectStoreActions.js | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/DropOption/DropOption.js b/src/components/DropOption/DropOption.js index 52ae59459..23467e963 100755 --- a/src/components/DropOption/DropOption.js +++ b/src/components/DropOption/DropOption.js @@ -4,6 +4,9 @@ import { Dropdown, Button, Icon, Menu, Tooltip } from 'antd' const DropOption = ({ onMenuClick, menuOptions = [], buttonStyle, dropdownProps, tooltipProps }) => { const menu = menuOptions.map(item => { + if (item.type === 'divider') { + return () + } const tooltip = item.tooltip !== undefined ? item.tooltip : '' return ( diff --git a/src/routes/objectStorage/ObjectStoreActions.js b/src/routes/objectStorage/ObjectStoreActions.js index f4242903b..c1a127c69 100644 --- a/src/routes/objectStorage/ObjectStoreActions.js +++ b/src/routes/objectStorage/ObjectStoreActions.js @@ -34,8 +34,9 @@ function actions({ selected, deleteObjectStore, editObjectStore, administrateObj const availableActions = [ { key: 'edit', name: 'Edit', disabled: !isObjectStoreEditable(selected) }, - { key: 'administrate', name: 'Administrate', disabled: !isObjectStoreAdministrable(selected) }, { key: 'delete', name: 'Delete', disabled: !isObjectStoreDeletable(selected) }, + { type: 'divider' }, + { key: 'administrate', name: 'Administrate', disabled: !isObjectStoreAdministrable(selected) }, ] return (