diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-24 00:09:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-24 00:09:46 +0300 |
commit | 8a7aaf86831d2a556578ae558a4fcab8bb659b20 (patch) | |
tree | 61c2b55aa48ff8e853e546cd3009dfc5423279c8 /app/assets/javascripts/vue_shared/components/project_selector | |
parent | 967812838c7e7742729a4c7aeb9859f98a509622 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/project_selector')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/project_selector/project_list_item.vue | 4 | ||||
-rw-r--r-- | app/assets/javascripts/vue_shared/components/project_selector/project_selector.vue | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/vue_shared/components/project_selector/project_list_item.vue b/app/assets/javascripts/vue_shared/components/project_selector/project_list_item.vue index c472e54efda..a51b2a3ab6d 100644 --- a/app/assets/javascripts/vue_shared/components/project_selector/project_list_item.vue +++ b/app/assets/javascripts/vue_shared/components/project_selector/project_list_item.vue @@ -1,6 +1,6 @@ <script> import { GlButton } from '@gitlab/ui'; -import _ from 'underscore'; +import { isString } from 'lodash'; import Icon from '~/vue_shared/components/icon.vue'; import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue'; import highlight from '~/lib/utils/highlight'; @@ -17,7 +17,7 @@ export default { project: { type: Object, required: true, - validator: p => _.isFinite(p.id) && _.isString(p.name) && _.isString(p.name_with_namespace), + validator: p => Number.isFinite(p.id) && isString(p.name) && isString(p.name_with_namespace), }, selected: { type: Boolean, diff --git a/app/assets/javascripts/vue_shared/components/project_selector/project_selector.vue b/app/assets/javascripts/vue_shared/components/project_selector/project_selector.vue index f984a0a6203..30a9633b6dc 100644 --- a/app/assets/javascripts/vue_shared/components/project_selector/project_selector.vue +++ b/app/assets/javascripts/vue_shared/components/project_selector/project_selector.vue @@ -1,5 +1,5 @@ <script> -import _ from 'underscore'; +import { debounce } from 'lodash'; import { GlLoadingIcon, GlSearchBoxByType, GlInfiniteScroll } from '@gitlab/ui'; import ProjectListItem from './project_list_item.vue'; @@ -61,9 +61,9 @@ export default { this.$emit('bottomReached'); }, isSelected(project) { - return Boolean(_.find(this.selectedProjects, { id: project.id })); + return this.selectedProjects.some(({ id }) => project.id === id); }, - onInput: _.debounce(function debouncedOnInput() { + onInput: debounce(function debouncedOnInput() { this.$emit('searched', this.searchQuery); }, SEARCH_INPUT_TIMEOUT_MS), }, |