fix some initial state bugs

This commit is contained in:
gempir 2020-02-08 18:52:47 +01:00
parent 963de9fe81
commit f8d6d539d4
4 changed files with 9 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -21,7 +21,8 @@ export default class AutocompleteInput extends Component {
/>
{this.state.focused && <ul>
{this.props.autocompletions
.filter(completion => completion.includes(this.props.value))
.filter(completion => completion.includes(this.props.value) && this.props.value !== "")
.sort()
.map(completion =>
<li key={completion} onClick={() => this.handleClick(completion)} onMouseDown={e => e.preventDefault()}>
{completion}

View file

@ -27,7 +27,7 @@ class LogSearch extends Component {
<Filter
channels={this.props.channels}
/>
{Object.values(this.props.logs).map(log =>
{this.props.channel && this.props.username && Object.values(this.props.logs).map(log =>
<LogView key={log.getTitle()} log={log} />
)}
</div>