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
f0ed80a2
Commit
f0ed80a2
authored
Jan 13, 2017
by
Eric Eastwood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix dropdown filter input value after blur
parent
6c119062
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
2 deletions
+25
-2
Gemfile.lock
Gemfile.lock
+1
-1
app/assets/javascripts/gl_dropdown.js
app/assets/javascripts/gl_dropdown.js
+1
-1
changelogs/unreleased/26616-fix-search-group-project-filters.yml
...ogs/unreleased/26616-fix-search-group-project-filters.yml
+4
-0
spec/javascripts/gl_dropdown_spec.js.es6
spec/javascripts/gl_dropdown_spec.js.es6
+19
-0
No files found.
Gemfile.lock
View file @
f0ed80a2
...
@@ -892,7 +892,7 @@ DEPENDENCIES
...
@@ -892,7 +892,7 @@ DEPENDENCIES
gemojione (~> 3.0)
gemojione (~> 3.0)
github-linguist (~> 4.7.0)
github-linguist (~> 4.7.0)
gitlab-flowdock-git-hook (~> 1.0.1)
gitlab-flowdock-git-hook (~> 1.0.1)
gitlab-markup (~> 1.5.
0
)
gitlab-markup (~> 1.5.
1
)
gitlab-turbolinks-classic (~> 2.5, >= 2.5.6)
gitlab-turbolinks-classic (~> 2.5, >= 2.5.6)
gitlab_omniauth-ldap (~> 1.2.1)
gitlab_omniauth-ldap (~> 1.2.1)
gollum-lib (~> 4.2)
gollum-lib (~> 4.2)
...
...
app/assets/javascripts/gl_dropdown.js
View file @
f0ed80a2
...
@@ -476,7 +476,7 @@
...
@@ -476,7 +476,7 @@
this
.
removeArrayKeyEvent
();
this
.
removeArrayKeyEvent
();
$input
=
this
.
dropdown
.
find
(
"
.dropdown-input-field
"
);
$input
=
this
.
dropdown
.
find
(
"
.dropdown-input-field
"
);
if
(
this
.
options
.
filterable
)
{
if
(
this
.
options
.
filterable
)
{
$input
.
blur
()
.
val
(
""
)
;
$input
.
blur
();
}
}
if
(
this
.
dropdown
.
find
(
"
.dropdown-toggle-page
"
).
length
)
{
if
(
this
.
dropdown
.
find
(
"
.dropdown-toggle-page
"
).
length
)
{
$
(
'
.dropdown-menu
'
,
this
.
dropdown
).
removeClass
(
PAGE_TWO_CLASS
);
$
(
'
.dropdown-menu
'
,
this
.
dropdown
).
removeClass
(
PAGE_TWO_CLASS
);
...
...
changelogs/unreleased/26616-fix-search-group-project-filters.yml
0 → 100644
View file @
f0ed80a2
---
title
:
Fix search group/project filtering to show results
merge_request
:
author
:
spec/javascripts/gl_dropdown_spec.js.es6
View file @
f0ed80a2
...
@@ -50,6 +50,9 @@
...
@@ -50,6 +50,9 @@
selectable: true,
selectable: true,
filterable: isFilterable,
filterable: isFilterable,
data: hasRemote ? remoteMock.bind({}, this.projectsData) : this.projectsData,
data: hasRemote ? remoteMock.bind({}, this.projectsData) : this.projectsData,
search: {
fields: ['name']
},
text: (project) => {
text: (project) => {
(project.name_with_namespace || project.name);
(project.name_with_namespace || project.name);
},
},
...
@@ -167,5 +170,21 @@
...
@@ -167,5 +170,21 @@
expect($(document.activeElement)).toEqual($(SEARCH_INPUT_SELECTOR));
expect($(document.activeElement)).toEqual($(SEARCH_INPUT_SELECTOR));
});
});
});
});
it('should still have input value on close and restore', () => {
let $searchInput = $(SEARCH_INPUT_SELECTOR);
initDropDown.call(this, false, true);
$searchInput
.trigger('focus')
.val('g')
.trigger('input');
expect($searchInput.val()).toEqual('g');
this.dropdownButtonElement.trigger('hidden.bs.dropdown');
$searchInput
.trigger('blur')
.trigger('focus');
expect($searchInput.val()).toEqual('g');
});
});
});
})();
})();
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