Refactor dropdown and action modal code slightly
Simplify it a bit and make it closer to upstream
This commit is contained in:
1 parent
2fd1db7c9d
commit
f87ce13afc
4 files changed
+25
-45
No files matched your search
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user