From 635cd1133c3239319b455b5f0ba511257ae209b5 Mon Sep 17 00:00:00 2001 From: Sahil Batra Date: Tue, 8 Jul 2025 15:19:03 +0530 Subject: [PATCH] groups-ui: Fix members list not updating when creating groups. On removing a user or group pill from input, the user or group was not being removed from the table. This was because of onPillRemove not being set for the pill widget as it was removed by mistake while doing other changes in ec65dad063d835. --- web/src/add_group_members_pill.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/src/add_group_members_pill.ts b/web/src/add_group_members_pill.ts index bf767ef061..feaf4232a5 100644 --- a/web/src/add_group_members_pill.ts +++ b/web/src/add_group_members_pill.ts @@ -122,10 +122,12 @@ export function create({ } if (onPillRemoveAction) { - void (async () => { - const user_ids = await get_pill_user_ids(pill_widget); - onPillRemoveAction(user_ids, get_pill_group_ids(pill_widget)); - })(); + pill_widget.onPillRemove(() => { + void (async () => { + const user_ids = await get_pill_user_ids(pill_widget); + onPillRemoveAction(user_ids, get_pill_group_ids(pill_widget)); + })(); + }); } function get_users(): User[] {