Commit d5d19a9f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'user-select-unassigned' into 'master'

Don't show Unassigned in user select when searching.

Fixes #2056.

When a search term is present, the Unassigned item isn't rendered, so the highlighted item is the first search result and hitting Enter works as expected.

See merge request !1620
parents 93a21183 3102454a
......@@ -11,14 +11,15 @@ class @ProjectUsersSelect
Api.projectUsers project_id, query.term, (users) ->
data = { results: users }
nullUser = {
name: 'Unassigned',
avatar: null,
username: 'none',
id: -1
}
data.results.unshift(nullUser)
if query.term.length == 0
nullUser = {
name: 'Unassigned',
avatar: null,
username: 'none',
id: -1
}
data.results.unshift(nullUser)
query.callback(data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment