Autocomplete fixes and improvements
This commit is contained in:
parent
fbf2d5f96c
commit
9a991a4dfd
4 changed files with 32 additions and 21 deletions
|
@ -28,9 +28,15 @@ export default class UserProvider extends AutocompleteProvider {
|
|||
if (command) {
|
||||
this.fuse.set(this.users);
|
||||
completions = this.fuse.search(command[0]).map(user => {
|
||||
const displayName = (user.name || user.userId || '').replace(' (IRC)', ''); // FIXME when groups are done
|
||||
let displayName = (user.name || user.userId || '').replace(' (IRC)', ''); // FIXME when groups are done
|
||||
let completion = displayName;
|
||||
if (range.start === 0) {
|
||||
completion += ': ';
|
||||
} else {
|
||||
completion += ' ';
|
||||
}
|
||||
return {
|
||||
completion: user.userId,
|
||||
completion,
|
||||
component: (
|
||||
<PillCompletion
|
||||
initialComponent={<MemberAvatar member={user} width={24} height={24}/>}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue