1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-11-27 08:31:20 +02:00

Fix: Add new comment

This commit is contained in:
Chen-I Lim 2021-01-19 09:47:27 -08:00
parent 5e4fcf57bd
commit f0f7b3ccc6
2 changed files with 4 additions and 2 deletions

View File

@ -198,6 +198,7 @@ class CardDetail extends React.Component<Props, State> {
<hr/>
<CommentsList
comments={comments}
rootId={card.rootId}
cardId={card.id}
/>
<hr/>

View File

@ -15,6 +15,7 @@ import {MarkdownEditor} from './markdownEditor'
type Props = {
comments: readonly IBlock[]
rootId: string
cardId: string
intl: IntlShape
}
@ -38,11 +39,11 @@ class CommentsList extends React.Component<Props, State> {
}
private sendComment = () => {
const {cardId} = this.props
const {rootId, cardId} = this.props
Utils.assertValue(cardId)
const block = new MutableCommentBlock({parentId: cardId, title: this.state.newComment})
const block = new MutableCommentBlock({rootId, parentId: cardId, title: this.state.newComment})
mutator.insertBlock(block, 'add comment')
this.setState({newComment: ''})
}