Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
98a95633
Commit
98a95633
authored
Dec 09, 2016
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reset filters when clear search is clicked
parent
88ed0159
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
app/assets/javascripts/filtered_search/filtered_search_dropdown.js.es6
...vascripts/filtered_search/filtered_search_dropdown.js.es6
+9
-0
app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
...avascripts/filtered_search/filtered_search_manager.js.es6
+3
-0
No files found.
app/assets/javascripts/filtered_search/filtered_search_dropdown.js.es6
View file @
98a95633
...
...
@@ -121,6 +121,15 @@
hideDropdown() {
this.getCurrentHook().list.hide();
}
resetFilters() {
const hook = this.getCurrentHook();
const data = hook.list.data;
const results = data.map(function(o) {
o.droplab_hidden = false;
});
hook.list.render(results);
}
}
global.FilteredSearchDropdown = FilteredSearchDropdown;
...
...
app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
View file @
98a95633
...
...
@@ -247,6 +247,9 @@
this.filteredSearchInput.value = '';
this.clearSearchButton.classList.add('hidden');
// Reset Filters
this.mapping[this.currentDropdown].reference.resetFilters();
// Force dropdown to hide
this.mapping[this.currentDropdown].reference.hideDropdown();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment