From d1af4bdd51192406b8ddb378c06133e83a50992a Mon Sep 17 00:00:00 2001 From: Sol Fisher Romanoff Date: Thu, 16 Jun 2022 08:25:09 +0300 Subject: [PATCH] Fix account selection garbage --- src/components/list_edit/list_edit.js | 7 ++++--- src/components/list_edit/list_edit.vue | 8 +++++--- src/components/list_new/list_new.js | 7 ++++--- src/components/list_new/list_new.vue | 8 +++++--- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/components/list_edit/list_edit.js b/src/components/list_edit/list_edit.js index 0e03dbcb..c3869885 100644 --- a/src/components/list_edit/list_edit.js +++ b/src/components/list_edit/list_edit.js @@ -57,15 +57,16 @@ const ListNew = { onInput () { this.search(this.query) }, - selectUser (user, event) { + selectUser (user) { if (this.selectedUserIds.includes(user.id)) { this.removeUser(user.id) - event.target.classList.remove('selected') } else { this.addUser(user) - event.target.classList.add('selected') } }, + isSelected (user) { + return this.selectedUserIds.includes(user.id) + }, addUser (user) { this.selectedUserIds.push(user.id) }, diff --git a/src/components/list_edit/list_edit.vue b/src/components/list_edit/list_edit.vue index cadd25da..5d0cc2d5 100644 --- a/src/components/list_edit/list_edit.vue +++ b/src/components/list_edit/list_edit.vue @@ -41,9 +41,11 @@ :key="user.id" class="member" > -
- -
+