diff options
Diffstat (limited to 'app/assets/javascripts/groups/groups_list.js')
-rw-r--r-- | app/assets/javascripts/groups/groups_list.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/assets/javascripts/groups/groups_list.js b/app/assets/javascripts/groups/groups_list.js new file mode 100644 index 00000000000..866dd7a61ff --- /dev/null +++ b/app/assets/javascripts/groups/groups_list.js @@ -0,0 +1,18 @@ +import FilterableList from '~/filterable_list'; + +/** + * Makes search request for groups when user types a value in the search input. + * Updates the html content of the page with the received one. + */ +export default class GroupsList { + constructor() { + const form = document.querySelector('form#group-filter-form'); + const filter = document.querySelector('.js-groups-list-filter'); + const holder = document.querySelector('.js-groups-list-holder'); + + if (form && filter && holder) { + const list = new FilterableList(form, filter, holder); + list.initSearch(); + } + } +} |