Use modal as a param

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-02-17 13:32:48 +01:00
parent a7847f2514
commit 86fe5f778d
No known key found for this signature in database
GPG key ID: 9760693FDD98A790
2 changed files with 3 additions and 4 deletions

View file

@ -415,10 +415,9 @@ export default class MessageComposer extends React.Component {
this.messageComposerInput._sendMessage();
}
onChange = () => {
if (!this.messageComposerInput) return;
onChange = (model) => {
this.setState({
isComposerEmpty: this.messageComposerInput.model.isEmpty,
isComposerEmpty: model.isEmpty,
});
}

View file

@ -538,7 +538,7 @@ export default class SendMessageComposer extends React.Component {
}
onChange = () => {
if (this.props.onChange) this.props.onChange();
if (this.props.onChange) this.props.onChange(this.model);
}
render() {