Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
98c5939e
Commit
98c5939e
authored
Apr 15, 2021
by
NataliaTepluhina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed search and filtered out duplicates
parent
6d15237d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
app/assets/javascripts/sidebar/components/assignees/sidebar_assignees_widget.vue
...sidebar/components/assignees/sidebar_assignees_widget.vue
+9
-6
No files found.
app/assets/javascripts/sidebar/components/assignees/sidebar_assignees_widget.vue
View file @
98c5939e
...
@@ -121,15 +121,18 @@ export default {
...
@@ -121,15 +121,18 @@ export default {
},
},
update
(
data
)
{
update
(
data
)
{
const
searchResults
=
data
.
workspace
?.
users
?.
nodes
.
map
(({
user
})
=>
user
)
||
[];
const
searchResults
=
data
.
workspace
?.
users
?.
nodes
.
map
(({
user
})
=>
user
)
||
[];
const
mergedSearchResults
=
this
.
participants
.
reduce
((
acc
,
current
)
=>
{
const
filteredParticipants
=
this
.
participants
.
filter
(
if
(
(
user
)
=>
!
acc
.
some
((
user
)
=>
current
.
username
===
user
.
username
)
&&
user
.
name
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
(
current
.
name
.
includes
(
this
.
search
)
||
current
.
username
.
includes
(
this
.
search
))
user
.
username
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
()),
)
{
);
const
mergedSearchResults
=
searchResults
.
reduce
((
acc
,
current
)
=>
{
if
(
!
acc
.
some
((
user
)
=>
current
.
username
===
user
.
username
))
{
acc
.
push
(
current
);
acc
.
push
(
current
);
}
}
return
acc
;
return
acc
;
},
searchResults
);
},
filteredParticipants
);
return
mergedSearchResults
;
return
mergedSearchResults
;
},
},
debounce
:
ASSIGNEES_DEBOUNCE_DELAY
,
debounce
:
ASSIGNEES_DEBOUNCE_DELAY
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment