BigW Consortium Gitlab

projects_list.js 602 Bytes
Newer Older
1
import FilterableList from './filterable_list';
2

3 4 5 6 7 8
/**
 * 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() {
9 10 11
    const form = document.querySelector('form#project-filter-form');
    const filter = document.querySelector('.js-projects-list-filter');
    const holder = document.querySelector('.js-projects-list-holder');
12

13 14 15 16
    if (form && filter && holder) {
      const list = new FilterableList(form, filter, holder);
      list.initSearch();
    }
17 18
  }
}