about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/containers
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/flavours/glitch/containers')
-rw-r--r--app/javascript/flavours/glitch/containers/dropdown_menu_container.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/containers/dropdown_menu_container.js b/app/javascript/flavours/glitch/containers/dropdown_menu_container.js
index 9d490de17..dccd93dab 100644
--- a/app/javascript/flavours/glitch/containers/dropdown_menu_container.js
+++ b/app/javascript/flavours/glitch/containers/dropdown_menu_container.js
@@ -14,8 +14,13 @@ const mapDispatchToProps = (dispatch, { status, items }) => ({
   onOpen(id, onItemClick, dropdownPlacement) {
     dispatch(isUserTouching() ? openModal('ACTIONS', {
       status,
-      actions: items,
-      onClick: onItemClick,
+      actions: items.map(
+        (item, i) => item ? {
+          ...item,
+          name: `${item.text}-${i}`,
+          onClick: (e) => { return onItemClick(i, e) },
+        } : null
+      ),
     }) : openDropdownMenu(id, dropdownPlacement));
   },
   onClose(id) {