Commit a6571089 authored by Kushal Pandya's avatar Kushal Pandya

Update class initialization syntax

parent 0ea146e6
...@@ -3,6 +3,8 @@ import initFilteredSearch from '~/pages/search/init_filtered_search'; ...@@ -3,6 +3,8 @@ import initFilteredSearch from '~/pages/search/init_filtered_search';
import { FILTERED_SEARCH } from '~/pages/constants'; import { FILTERED_SEARCH } from '~/pages/constants';
export default () => { export default () => {
initFilteredSearch(FILTERED_SEARCH.ISSUES); initFilteredSearch({
page: FILTERED_SEARCH.ISSUES,
});
projectSelect(); projectSelect();
}; };
...@@ -3,6 +3,8 @@ import initFilteredSearch from '~/pages/search/init_filtered_search'; ...@@ -3,6 +3,8 @@ import initFilteredSearch from '~/pages/search/init_filtered_search';
import { FILTERED_SEARCH } from '~/pages/constants'; import { FILTERED_SEARCH } from '~/pages/constants';
export default () => { export default () => {
initFilteredSearch(FILTERED_SEARCH.MERGE_REQUESTS); initFilteredSearch({
page: FILTERED_SEARCH.MERGE_REQUESTS,
});
projectSelect(); projectSelect();
}; };
...@@ -8,7 +8,9 @@ import { FILTERED_SEARCH } from '~/pages/constants'; ...@@ -8,7 +8,9 @@ import { FILTERED_SEARCH } from '~/pages/constants';
import { ISSUABLE_INDEX } from '~/pages/projects/constants'; import { ISSUABLE_INDEX } from '~/pages/projects/constants';
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
initFilteredSearch(FILTERED_SEARCH.ISSUES); initFilteredSearch({
page: FILTERED_SEARCH.ISSUES,
});
new IssuableIndex(ISSUABLE_INDEX.ISSUE); new IssuableIndex(ISSUABLE_INDEX.ISSUE);
new ShortcutsNavigation(); new ShortcutsNavigation();
......
...@@ -6,7 +6,9 @@ import { FILTERED_SEARCH } from '~/pages/constants'; ...@@ -6,7 +6,9 @@ import { FILTERED_SEARCH } from '~/pages/constants';
import { ISSUABLE_INDEX } from '~/pages/projects/constants'; import { ISSUABLE_INDEX } from '~/pages/projects/constants';
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
initFilteredSearch(FILTERED_SEARCH.MERGE_REQUESTS); initFilteredSearch({
page: FILTERED_SEARCH.MERGE_REQUESTS,
});
new IssuableIndex(ISSUABLE_INDEX.MERGE_REQUEST); // eslint-disable-line no-new new IssuableIndex(ISSUABLE_INDEX.MERGE_REQUEST); // eslint-disable-line no-new
new ShortcutsNavigation(); // eslint-disable-line no-new new ShortcutsNavigation(); // eslint-disable-line no-new
new UsersSelect(); // eslint-disable-line no-new new UsersSelect(); // eslint-disable-line no-new
......
export default (page) => { export default ({ page }) => {
const filteredSearchEnabled = gl.FilteredSearchManager && document.querySelector('.filtered-search'); const filteredSearchEnabled = gl.FilteredSearchManager && document.querySelector('.filtered-search');
if (filteredSearchEnabled) { if (filteredSearchEnabled) {
const filteredSearchManager = new gl.FilteredSearchManager(page); const filteredSearchManager = new gl.FilteredSearchManager({ page });
filteredSearchManager.setup(); filteredSearchManager.setup();
} }
}; };
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