Commit 9a9bb024 authored by kushalpandya's avatar kushalpandya

Optimize jQuery lookup

parent fb78fb73
...@@ -17,8 +17,9 @@ export default class ProtectedTagAccessDropdown { ...@@ -17,8 +17,9 @@ export default class ProtectedTagAccessDropdown {
this.accessLevelsData = accessLevelsData.roles; this.accessLevelsData = accessLevelsData.roles;
this.$dropdown = $dropdown; this.$dropdown = $dropdown;
this.$wrap = this.$dropdown.closest(`.${this.accessLevel}-container`); this.$wrap = this.$dropdown.closest(`.${this.accessLevel}-container`);
this.usersPath = $('.js-protected-tags-container').data('users-autocomplete'); this.$protectedTagsContainer = $('.js-protected-tags-container');
this.groupsPath = $('.js-protected-tags-container').data('groups-autocomplete'); this.usersPath = this.$protectedTagsContainer.data('users-autocomplete');
this.groupsPath = this.$protectedTagsContainer.data('groups-autocomplete');
this.defaultLabel = this.$dropdown.data('defaultLabel'); this.defaultLabel = this.$dropdown.data('defaultLabel');
this.setSelectedItems([]); this.setSelectedItems([]);
......
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