mirror of
https://github.com/wassname/talk.git
synced 2026-07-02 16:49:03 +08:00
Merge pull request #917 from coralproject/fix-offtopic-checkbox
OffTopic checkbox should follow state
This commit is contained in:
@@ -29,12 +29,13 @@ export default class OffTopicCheckbox extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const checked = this.props.tags.indexOf(this.label) >= 0;
|
||||
return (
|
||||
<div className={styles.offTopic}>
|
||||
{
|
||||
!this.props.isReply ? (
|
||||
<label className={styles.offTopicLabel}>
|
||||
<input type="checkbox" onChange={this.handleChange}/>
|
||||
<input type="checkbox" onChange={this.handleChange} checked={checked}/>
|
||||
{t('off_topic')}
|
||||
</label>
|
||||
) : null
|
||||
|
||||
Reference in New Issue
Block a user