mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
minor: Specify types of pills while initializing pill typeahead.
In options that we pass to pill_typeahead.set_up we specify if we want typeahead to support stream or user_group pills, and use users as source by default. Using users for source by default, can have unnecessary suggestions in typeaheads where only user_groups or streams are needed. So to solve that, we specify if we want users pill in the input. This is then utilized in further commits, to clean up hacky code that deals with intializing source for typeahead.
This commit is contained in:
committed by
Tim Abbott
parent
637f648828
commit
0080daa5a3
@@ -275,7 +275,7 @@ export function populate_user_groups() {
|
||||
|
||||
const input = pill_container.children(".input");
|
||||
if (can_edit(data.id)) {
|
||||
const opts = {update_func: update_cancel_button};
|
||||
const opts = {update_func: update_cancel_button, user: true};
|
||||
pill_typeahead.set_up(input, pills, opts);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user