gitlab-org--gitlab-foss/app/assets/javascripts/projects_list.js
Denys Mishunov 352d535849 Fixed back navigation for projects filter
Filterable list now sends request to filter the projects list
explicitly with `json` extension to avoid breakage when navigating back
from a project to the filtered project's list.
2019-07-05 12:50:50 +02:00

18 lines
636 B
JavaScript

import ProjectsFilterableList from './projects/projects_filterable_list';
/**
* Makes search request for projects when user types a value in the search input.
* Updates the html content of the page with the received one.
*/
export default class ProjectsList {
constructor() {
const form = document.querySelector('form#project-filter-form');
const filter = document.querySelector('.js-projects-list-filter');
const holder = document.querySelector('.js-projects-list-holder');
if (form && filter && holder) {
const list = new ProjectsFilterableList(form, filter, holder);
list.initSearch();
}
}
}