diff --git a/web/src/settings_components.ts b/web/src/settings_components.ts index 58c387dd35..106951f6d6 100644 --- a/web/src/settings_components.ts +++ b/web/src/settings_components.ts @@ -1476,23 +1476,21 @@ type group_setting_name = export function create_group_setting_widget({ $pill_container, setting_name, - setting_type, group, }: { $pill_container: JQuery; setting_name: group_setting_name; - setting_type: "realm" | "stream" | "group"; group?: UserGroup; }): GroupSettingPillContainer { - const pill_widget = group_setting_pill.create_pills( - $pill_container, + const pill_widget = group_setting_pill.create_pills($pill_container, setting_name, "group"); + const opts: { + setting_name: string; + group: UserGroup | undefined; + setting_type: "group"; + } = { setting_name, - setting_type, - ); - const opts = { - setting_name, - setting_type, group, + setting_type: "group", }; group_setting_pill.set_up_pill_typeahead({pill_widget, $pill_container, opts}); diff --git a/web/src/user_group_create.ts b/web/src/user_group_create.ts index 5741cc23b9..06755447d2 100644 --- a/web/src/user_group_create.ts +++ b/web/src/user_group_create.ts @@ -262,31 +262,26 @@ export function set_up_handlers(): void { can_add_members_group_widget = settings_components.create_group_setting_widget({ $pill_container: $container.find(".can-add-members-group-container .pill-container"), setting_name: "can_add_members_group", - setting_type: "group", }); const $pill_container = $container.find(".can-manage-group-container .pill-container"); can_manage_group_widget = settings_components.create_group_setting_widget({ $pill_container, setting_name: "can_manage_group", - setting_type: "group", }); can_join_group_widget = settings_components.create_group_setting_widget({ $pill_container: $container.find(".can-join-group-container .pill-container"), setting_name: "can_join_group", - setting_type: "group", }); can_leave_group_widget = settings_components.create_group_setting_widget({ $pill_container: $container.find(".can-leave-group-container .pill-container"), setting_name: "can_leave_group", - setting_type: "group", }); can_mention_group_widget = settings_components.create_group_setting_widget({ $pill_container: $container.find(".can-mention-group-container .pill-container"), setting_name: "can_mention_group", - setting_type: "group", }); } diff --git a/web/src/user_group_edit.js b/web/src/user_group_edit.js index ba9cc7aaf0..7456cafef4 100644 --- a/web/src/user_group_edit.js +++ b/web/src/user_group_edit.js @@ -154,35 +154,30 @@ function show_general_settings(group) { settings_components.create_group_setting_widget({ $pill_container: $edit_container.find(".can-add-members-group-container .pill-container"), setting_name: "can_add_members_group", - setting_type: "group", group, }); settings_components.create_group_setting_widget({ $pill_container: $edit_container.find(".can-manage-group-container .pill-container"), setting_name: "can_manage_group", - setting_type: "group", group, }); settings_components.create_group_setting_widget({ $pill_container: $edit_container.find(".can-join-group-container .pill-container"), setting_name: "can_join_group", - setting_type: "group", group, }); settings_components.create_group_setting_widget({ $pill_container: $edit_container.find(".can-leave-group-container .pill-container"), setting_name: "can_leave_group", - setting_type: "group", group, }); settings_components.create_group_setting_widget({ $pill_container: $edit_container.find(".can-mention-group-container .pill-container"), setting_name: "can_mention_group", - setting_type: "group", group, }); update_general_panel_ui(group);