mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-11-11 17:00:44 +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) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.props = props;
|
|
||||||
this._onSelectContact = this._onSelectContact.bind(this);
|
|
||||||
this.state = this._getStateFromStores();
|
this.state = this._getStateFromStores();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -66,8 +64,11 @@ export default class SidebarParticipantPicker extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {focusedContact} = this.state
|
const {sortedContacts, focusedContact} = this.state
|
||||||
const value = this._getKeyForContact(focusedContact)
|
const value = this._getKeyForContact(focusedContact)
|
||||||
|
if (sortedContacts.length === 0) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div className="sidebar-participant-picker">
|
<div className="sidebar-participant-picker">
|
||||||
<select tabIndex={-1} value={value} onChange={this._onSelectContact}>
|
<select tabIndex={-1} value={value} onChange={this._onSelectContact}>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue