debian-mirror-gitlab/app/assets/javascripts/projects_list.js
2017-08-17 22:00:37 +05:30

18 lines
602 B
JavaScript

import FilterableList from './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 FilterableList(form, filter, holder);
list.initSearch();
}
}
}