fix reply bar bug

This commit is contained in:
xmcp
2020-01-12 19:43:10 +08:00
parent 5a34673cd1
commit 906d228a37
2 changed files with 3 additions and 2 deletions

View File

@@ -64,13 +64,14 @@ export class SafeTextarea extends Component {
this.clear=this.clear.bind(this);
this.area_ref=React.createRef();
this.change_callback=props.on_change||(()=>{});
this.change_callback(this.state.text);
this.submit_callback=props.on_submit||(()=>{});
}
componentDidMount() {
this.setState({
text: window.TEXTAREA_BACKUP[this.props.id]||''
},()=>{
this.change_callback(this.state.text);
});
}