fix some initial state bugs
This commit is contained in:
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
|
@ -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}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue