Commit 69362941 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'refactor-filter-dropdown-code-analytics-component' into 'master'

Code Analytics: Use options for stateless data in filter dropdowns component

See merge request gitlab-org/gitlab!19024
parents 664c8cde b1329c8c
...@@ -26,14 +26,6 @@ export default { ...@@ -26,14 +26,6 @@ export default {
data() { data() {
return { return {
multiProjectSelect: false, multiProjectSelect: false,
groupsQueryParams: {
min_access_level: featureAccessLevel.EVERYONE,
},
projectsQueryParams: {
per_page: PROJECTS_PER_PAGE,
with_shared: false,
order_by: 'last_activity_at',
},
}; };
}, },
computed: { computed: {
...@@ -58,6 +50,14 @@ export default { ...@@ -58,6 +50,14 @@ export default {
this.setSelectedFileQuantity(fileQuantity); this.setSelectedFileQuantity(fileQuantity);
}, },
}, },
groupsQueryParams: {
min_access_level: featureAccessLevel.EVERYONE,
},
projectsQueryParams: {
per_page: PROJECTS_PER_PAGE,
with_shared: false,
order_by: 'last_activity_at',
},
}; };
</script> </script>
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
> >
<groups-dropdown-filter <groups-dropdown-filter
class="dropdown-select" class="dropdown-select"
:query-params="groupsQueryParams" :query-params="$options.groupsQueryParams"
@selected="onGroupSelect" @selected="onGroupSelect"
/> />
<projects-dropdown-filter <projects-dropdown-filter
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
:key="selectedGroup.id" :key="selectedGroup.id"
class="ml-md-1 mt-1 mt-md-0 dropdown-select" class="ml-md-1 mt-1 mt-md-0 dropdown-select"
:group-id="selectedGroup.id" :group-id="selectedGroup.id"
:query-params="projectsQueryParams" :query-params="$options.projectsQueryParams"
:multi-select="multiProjectSelect" :multi-select="multiProjectSelect"
@selected="onProjectSelect" @selected="onProjectSelect"
/> />
......
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