We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5b1da6 commit 6c8162cCopy full SHA for 6c8162c
1 file changed
src/pages/chats/new-chat.ts
@@ -40,7 +40,13 @@ export class NewChatComponent implements OnInit {
40
}
41
42
loadUsers(): void {
43
- this.users = this.findUsers();
+ // Fetch all users matching search pattern
44
+ const subscription = MeteorObservable.subscribe('users');
45
+ const autorun = MeteorObservable.autorun();
46
+
47
+ Observable.merge(subscription, autorun).subscribe(() => {
48
+ this.users = this.findUsers();
49
+ });
50
51
52
findUsers(): Observable<User[]> {
0 commit comments