fix: slack share channel selection

This commit is contained in:
Shekar Siri 2021-05-20 23:58:23 +05:30
parent 79f1d2f20a
commit 8e0473172c

View file

@ -19,7 +19,7 @@ export default class SharePopup extends React.PureComponent {
state = {
comment: '',
isOpen: false,
channelId: this.props.channels.getIn([ 0, 'id' ]),
channelId: this.props.channels.getIn([ 0, 'webhookId' ]),
}
editMessage = e => this.setState({ comment: e.target.value })
@ -46,10 +46,10 @@ export default class SharePopup extends React.PureComponent {
changeChannel = (e, { value }) => this.setState({ channelId: value })
render() {
const { trigger, loading, channels, tenantId } = this.props;
const { trigger, loading, channels } = this.props;
const { comment, isOpen, channelId } = this.state;
const options = channels.map(({ id, name }) => ({ value: id, text: name })).toJS();
const options = channels.map(({ webhookId, name }) => ({ value: webhookId, text: name })).toJS();
return (
<Popup
open={ isOpen }