Added onIsEmptyChanged prop
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
c9f5c90047
commit
17f09d3b7a
1 changed files with 6 additions and 0 deletions
|
@ -117,6 +117,7 @@ export default class SendMessageComposer extends React.Component {
|
|||
placeholder: PropTypes.string,
|
||||
permalinkCreator: PropTypes.object.isRequired,
|
||||
replyToEvent: PropTypes.object,
|
||||
onIsEmptyChanged: PropTypes.func,
|
||||
};
|
||||
|
||||
static contextType = MatrixClientContext;
|
||||
|
@ -534,10 +535,15 @@ export default class SendMessageComposer extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
onChange = () => {
|
||||
this.props.onIsEmptyChanged(this.model.isEmpty);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="mx_SendMessageComposer" onClick={this.focusComposer} onKeyDown={this._onKeyDown}>
|
||||
<BasicMessageComposer
|
||||
onChange={this.onChange}
|
||||
ref={this._setEditorRef}
|
||||
model={this.model}
|
||||
room={this.props.room}
|
||||
|
|
Loading…
Reference in a new issue