From 54803d0e11c5b0192dbab348fbc930a76c60699d Mon Sep 17 00:00:00 2001 From: Paul Neubauer Date: Wed, 19 Apr 2023 09:37:30 +0200 Subject: [PATCH] Fix weird filter output --- .../src/components/Groups/SideBar/MembersPanel.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/web-app-admin-settings/src/components/Groups/SideBar/MembersPanel.vue b/packages/web-app-admin-settings/src/components/Groups/SideBar/MembersPanel.vue index 32e16fb18c9..7bcdd8e0e5d 100644 --- a/packages/web-app-admin-settings/src/components/Groups/SideBar/MembersPanel.vue +++ b/packages/web-app-admin-settings/src/components/Groups/SideBar/MembersPanel.vue @@ -49,9 +49,7 @@ export default defineComponent({ const members = computed(() => { if (group) { - return unref(group) - .members.sort((a, b) => a.displayName.localeCompare(b.displayName)) - .map((u) => ({ ...u, kind: 'user' })) + return unref(group).members.sort((a, b) => a.displayName.localeCompare(b.displayName)) } return [] }) @@ -64,7 +62,8 @@ export default defineComponent({ if (unref(membersListRef)) { markInstance.value = new Mark(unref(membersListRef)) unref(markInstance).unmark() - unref(markInstance).mark(unref(filterTerm), { + const searchTermRegex = new RegExp(`\\b${unref(filterTerm)}\\b`, 'gi') + unref(markInstance).markRegExp(searchTermRegex, { element: 'span', className: 'highlight-mark' })