mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-09 02:42:47 +00:00
update codes for slate (#3170)
This commit is contained in:
@@ -10,7 +10,8 @@ import '../../css/comments-list.css';
|
||||
const { username, repoID, filePath } = window.app.pageOptions;
|
||||
|
||||
const CommentPanelPropTypes = {
|
||||
toggleCommentPanel: PropTypes.func.isRequired
|
||||
toggleCommentPanel: PropTypes.func.isRequired,
|
||||
commentsNumber: PropTypes.number,
|
||||
};
|
||||
|
||||
class CommentPanel extends React.Component {
|
||||
@@ -75,6 +76,12 @@ class CommentPanel extends React.Component {
|
||||
this.listComments();
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (this.props.commentsNumber !== nextProps.commentsNumber) {
|
||||
this.listComments();
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="seafile-comment">
|
||||
|
Reference in New Issue
Block a user