mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-11 11:47:40 +03:00
Add 'searching known users' to the user picker
So it's more obvious it's only finding people you've already seen Fixes https://github.com/vector-im/riot-web/issues/2931
This commit is contained in:
parent
fcb1d7a664
commit
0b67fd5b4e
2 changed files with 10 additions and 1 deletions
|
@ -396,11 +396,16 @@ module.exports = React.createClass({
|
|||
if (this.state.error) {
|
||||
error = <div className="mx_ChatInviteDialog_error">You have entered an invalid contact. Try using their Matrix ID or email address.</div>
|
||||
} else {
|
||||
const addressSelectorHeader = <div className="mx_ChatInviteDialog_addressSelectHeader">
|
||||
Searching known users
|
||||
</div>;
|
||||
addressSelector = (
|
||||
<AddressSelector ref={(ref) => {this.addressSelector = ref}}
|
||||
addressList={ this.state.queryList }
|
||||
onSelected={ this.onSelected }
|
||||
truncateAt={ TRUNCATE_QUERY_LIST } />
|
||||
truncateAt={ TRUNCATE_QUERY_LIST }
|
||||
header={ addressSelectorHeader }
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,9 @@ module.exports = React.createClass({
|
|||
addressList: React.PropTypes.array.isRequired,
|
||||
truncateAt: React.PropTypes.number.isRequired,
|
||||
selected: React.PropTypes.number,
|
||||
|
||||
// Element to put as a header on top of the list
|
||||
header: React.PropTypes.node,
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
|
@ -147,6 +150,7 @@ module.exports = React.createClass({
|
|||
|
||||
return (
|
||||
<div className={classes} ref={(ref) => {this.scrollElement = ref}}>
|
||||
{ this.props.header }
|
||||
{ this.createAddressListTiles() }
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue