1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

Hide/show autocomplete based on selection state

This commit is contained in:
Aviral Dasgupta
2016-06-21 15:46:20 +05:30
parent f6a76edfdf
commit fb6eec0f7d
11 changed files with 114 additions and 43 deletions

View File

@@ -352,7 +352,9 @@ export default class MessageComposerInput extends React.Component {
}
if(this.props.onContentChanged) {
this.props.onContentChanged(editorState.getCurrentContent().getPlainText());
this.props.onContentChanged(editorState.getCurrentContent().getPlainText(),
RichText.getTextSelectionOffsets(editorState.getSelection(),
editorState.getCurrentContent().getBlocksAsArray()));
}
}