mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-04 03:34:28 +08:00
fix(contact-sidebar): Don't render <select> when no contacts available
This commit is contained in:
parent
317f9be93d
commit
cb46f8a9d8
1 changed files with 4 additions and 3 deletions
|
@ -11,8 +11,6 @@ export default class SidebarParticipantPicker extends React.Component {
|
|||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.props = props;
|
||||
this._onSelectContact = this._onSelectContact.bind(this);
|
||||
this.state = this._getStateFromStores();
|
||||
}
|
||||
|
||||
|
@ -66,8 +64,11 @@ export default class SidebarParticipantPicker extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const {focusedContact} = this.state
|
||||
const {sortedContacts, focusedContact} = this.state
|
||||
const value = this._getKeyForContact(focusedContact)
|
||||
if (sortedContacts.length === 0) {
|
||||
return false
|
||||
}
|
||||
return (
|
||||
<div className="sidebar-participant-picker">
|
||||
<select tabIndex={-1} value={value} onChange={this._onSelectContact}>
|
||||
|
|
Loading…
Add table
Reference in a new issue