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()));
}
}