From 8974442084b661814215dd432a9f8ff2808cf555 Mon Sep 17 00:00:00 2001 From: Aviral Dasgupta Date: Thu, 8 Sep 2016 00:36:23 +0530 Subject: [PATCH] Hide empty autocomplete and remove word counter --- src/components/views/rooms/Autocomplete.js | 6 +++--- src/components/views/rooms/MessageComposer.js | 1 - src/components/views/rooms/MessageComposerInput.js | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/views/rooms/Autocomplete.js b/src/components/views/rooms/Autocomplete.js index 4b2e23a8b8..9b8b55ab51 100644 --- a/src/components/views/rooms/Autocomplete.js +++ b/src/components/views/rooms/Autocomplete.js @@ -149,13 +149,13 @@ export default class Autocomplete extends React.Component { {completionResult.provider.renderCompletions(completions)} ) : null; - }); + }).filter(completion => !!completion); - return ( + return renderedCompletions.length > 0 ? (
this.container = e}> {renderedCompletions}
- ); + ) : null; } } diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index 971024eb57..fdb6e4e169 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -318,7 +318,6 @@ export default class MessageComposer extends React.Component {
{formatButtons}
- {this.state.inputState.wordCount} !!w).length; this.props.onInputStateChanged(state); } }