Commit efa293b2 authored by Jan Tammen's avatar Jan Tammen Committed by Joram Wilander

MM-12221: Pass channel and channel member to onClick handler for mobile...

MM-12221: Pass channel and channel member to onClick handler for mobile channel header plugins. (#1728)
parent 2e65f3ba
......@@ -30,7 +30,7 @@ export default class MobileChannelHeaderPlug extends React.PureComponent {
return (
<div
className='navbar-toggle navbar-right__icon pull-right'
onClick={plug.action}
onClick={() => this.fireAction(plug)}
>
<span className='icon navbar-plugin-button'>
{plug.icon}
......@@ -49,7 +49,7 @@ export default class MobileChannelHeaderPlug extends React.PureComponent {
<a
role='menuitem'
href='#'
onClick={plug.action}
onClick={() => this.fireAction(plug)}
>
{plug.dropdownText}
</a>
......@@ -58,6 +58,10 @@ export default class MobileChannelHeaderPlug extends React.PureComponent {
});
}
fireAction(plug) {
return plug.action(this.props.channel, this.props.channelMember);
}
render() {
const components = this.props.components || [];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment