回答編集履歴

1

typo

2021/07/15 23:56

投稿

shiketa
shiketa

スコア4036

test CHANGED
@@ -88,23 +88,13 @@
88
88
 
89
89
  keyword: function(newValue, oldValue) {
90
90
 
91
- this.filteredUsers = [];
91
+ this.filteredUsers = this.users.filter(
92
92
 
93
- for (var user of this.users) {
93
+ user =>
94
94
 
95
- if (
95
+ user.name.includes(newValue) || user.email.includes(newValue)
96
96
 
97
- user.name.includes(newValue) ||
98
-
99
- user.email.includes(newValue)
100
-
101
- ) {
97
+ );
102
-
103
- this.filteredUsers.push(user);
104
-
105
- }
106
-
107
- }
108
98
 
109
99
  }
110
100