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:
parent
5e4fcf57bd
commit
f0f7b3ccc6
@ -198,6 +198,7 @@ class CardDetail extends React.Component<Props, State> {
|
||||
<hr/>
|
||||
<CommentsList
|
||||
comments={comments}
|
||||
rootId={card.rootId}
|
||||
cardId={card.id}
|
||||
/>
|
||||
<hr/>
|
||||
|
@ -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: ''})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user