Fix actions modal on mobile (fixes #441)

th-downstream
Thibaut Girka 7 years ago
parent 64f74da493
commit 3e703fe757

@ -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) {

@ -22,7 +22,6 @@ export default class ActionsModal extends ImmutablePureComponent {
meta: PropTypes.node,
name: PropTypes.string,
on: PropTypes.bool,
onClick: PropTypes.func,
onPassiveClick: PropTypes.func,
text: PropTypes.node,
})),

Loading…
Cancel
Save