From 0c3eeae4205f42fad8a27ebd1cd91ed624e9caf7 Mon Sep 17 00:00:00 2001 From: Jake/Rads Date: Sat, 25 Jun 2022 22:31:53 +0200 Subject: [PATCH] fix(dashboard): actually delete members from list --- dashboard/src/lib/list/List.svelte | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dashboard/src/lib/list/List.svelte b/dashboard/src/lib/list/List.svelte index c95ecfaa..b0ece77d 100644 --- a/dashboard/src/lib/list/List.svelte +++ b/dashboard/src/lib/list/List.svelte @@ -101,7 +101,13 @@ } */ function updateDelete(event: any) { - list = (list as any[]).filter(item => item.id !== event.detail); + if (itemType === "member") { + members = members.filter(m => m.id !== event.detail); + list = members; + } else if (itemType === "group") { + groups = groups.filter(g => g.id !== event.detail); + list = groups; + } } function getItemLink(item: Member | Group): string {