mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-12-05 04:55:05 +00:00
Merge pull request #442 from ThibG/glitch-soc/fixes/actions-modal-mobile
Fix actions modal on mobile (fixes #441)
This commit is contained in:
commit
65b8880ec9
|
@ -14,8 +14,13 @@ const mapDispatchToProps = (dispatch, { status, items }) => ({
|
||||||
onOpen(id, onItemClick, dropdownPlacement) {
|
onOpen(id, onItemClick, dropdownPlacement) {
|
||||||
dispatch(isUserTouching() ? openModal('ACTIONS', {
|
dispatch(isUserTouching() ? openModal('ACTIONS', {
|
||||||
status,
|
status,
|
||||||
actions: items,
|
actions: items.map(
|
||||||
onClick: onItemClick,
|
(item, i) => item ? {
|
||||||
|
...item,
|
||||||
|
name: `${item.text}-${i}`,
|
||||||
|
onClick: (e) => { return onItemClick(i, e) },
|
||||||
|
} : null
|
||||||
|
),
|
||||||
}) : openDropdownMenu(id, dropdownPlacement));
|
}) : openDropdownMenu(id, dropdownPlacement));
|
||||||
},
|
},
|
||||||
onClose(id) {
|
onClose(id) {
|
||||||
|
|
|
@ -22,7 +22,6 @@ export default class ActionsModal extends ImmutablePureComponent {
|
||||||
meta: PropTypes.node,
|
meta: PropTypes.node,
|
||||||
name: PropTypes.string,
|
name: PropTypes.string,
|
||||||
on: PropTypes.bool,
|
on: PropTypes.bool,
|
||||||
onClick: PropTypes.func,
|
|
||||||
onPassiveClick: PropTypes.func,
|
onPassiveClick: PropTypes.func,
|
||||||
text: PropTypes.node,
|
text: PropTypes.node,
|
||||||
})),
|
})),
|
||||||
|
|
Loading…
Reference in a new issue