diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-02-09 12:23:57 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-02-09 13:23:12 +0100 |
commit | f87ce13afc25b4ea56b6d7e4a85eac4cee5591da (patch) | |
tree | 2745f24178289799ab4a617a1f7defe9a77229c9 /app/javascript/flavours/glitch/containers | |
parent | 2fd1db7c9d0fe8c1cca159b9b0818c72e7c318aa (diff) |
Refactor dropdown and action modal code slightly
Simplify it a bit and make it closer to upstream
Diffstat (limited to 'app/javascript/flavours/glitch/containers')
-rw-r--r-- | app/javascript/flavours/glitch/containers/dropdown_menu_container.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/containers/dropdown_menu_container.js b/app/javascript/flavours/glitch/containers/dropdown_menu_container.js index 1c0385b74..d18e640a4 100644 --- a/app/javascript/flavours/glitch/containers/dropdown_menu_container.js +++ b/app/javascript/flavours/glitch/containers/dropdown_menu_container.js @@ -18,11 +18,12 @@ const mapDispatchToProps = (dispatch, { status, items, scrollKey }) => ({ (item, i) => item ? { ...item, name: `${item.text}-${i}`, - onClick: item.action ? ((e) => { return onItemClick(i, e) }) : null, } : null ), + onClick: onItemClick, }) : openDropdownMenu(id, dropdownPlacement, keyboard, scrollKey)); }, + onClose(id) { dispatch(closeModal('ACTIONS')); dispatch(closeDropdownMenu(id)); |