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
Jérome Perrin
gitlab-ce
Commits
8e7929b8
Commit
8e7929b8
authored
Jan 20, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Checks if rendered count has changed rather than relying on key char
parent
ecf08ae1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
app/assets/javascripts/droplab/droplab.js
app/assets/javascripts/droplab/droplab.js
+0
-1
app/assets/javascripts/droplab/droplab_filter.js
app/assets/javascripts/droplab/droplab_filter.js
+15
-7
No files found.
app/assets/javascripts/droplab/droplab.js
View file @
8e7929b8
...
@@ -615,7 +615,6 @@ require('./window')(function(w){
...
@@ -615,7 +615,6 @@ require('./window')(function(w){
if
(
elOffsetTop
>
filterDropdownBottom
)
{
if
(
elOffsetTop
>
filterDropdownBottom
)
{
filterDropdownEl
.
scrollTop
=
elOffsetTop
-
filterDropdownBottom
;
filterDropdownEl
.
scrollTop
=
elOffsetTop
-
filterDropdownBottom
;
console
.
log
(
filterDropdownEl
.
scrollTop
);
}
}
}
}
}
}
...
...
app/assets/javascripts/droplab/droplab_filter.js
View file @
8e7929b8
...
@@ -3,10 +3,11 @@
...
@@ -3,10 +3,11 @@
/* global droplab */
/* global droplab */
require
(
'
../window
'
)(
function
(
w
){
require
(
'
../window
'
)(
function
(
w
){
var
charRegex
=
new
RegExp
(
'
^.$
'
,
'
g
'
);
w
.
droplabFilter
=
{
w
.
droplabFilter
=
{
keydownWrapper
:
function
(
e
){
keydownWrapper
:
function
(
e
){
var
hiddenCount
=
0
;
var
dataHiddenCount
=
0
;
var
list
=
e
.
detail
.
hook
.
list
;
var
list
=
e
.
detail
.
hook
.
list
;
var
data
=
list
.
data
;
var
data
=
list
.
data
;
var
value
=
e
.
detail
.
hook
.
trigger
.
value
.
toLowerCase
();
var
value
=
e
.
detail
.
hook
.
trigger
.
value
.
toLowerCase
();
...
@@ -18,10 +19,6 @@ require('../window')(function(w){
...
@@ -18,10 +19,6 @@ require('../window')(function(w){
return
;
return
;
}
}
if
(
!
charRegex
.
test
(
e
.
detail
.
key
))
{
return
;
}
if
(
config
&&
config
.
filterFunction
&&
typeof
config
.
filterFunction
===
'
function
'
)
{
if
(
config
&&
config
.
filterFunction
&&
typeof
config
.
filterFunction
===
'
function
'
)
{
filterFunction
=
config
.
filterFunction
;
filterFunction
=
config
.
filterFunction
;
}
else
{
}
else
{
...
@@ -32,11 +29,22 @@ require('../window')(function(w){
...
@@ -32,11 +29,22 @@ require('../window')(function(w){
};
};
}
}
dataHiddenCount
=
data
.
filter
(
function
(
o
)
{
return
!
o
.
droplab_hidden
;
}).
length
;
matches
=
data
.
map
(
function
(
o
)
{
matches
=
data
.
map
(
function
(
o
)
{
return
filterFunction
(
o
,
value
);
return
filterFunction
(
o
,
value
);
});
});
hiddenCount
=
matches
.
filter
(
function
(
o
)
{
return
!
o
.
droplab_hidden
;
}).
length
;
if
(
dataHiddenCount
!==
hiddenCount
)
{
list
.
render
(
matches
);
list
.
render
(
matches
);
list
.
currentIndex
=
0
;
list
.
currentIndex
=
0
;
}
},
},
init
:
function
init
(
hookInput
)
{
init
:
function
init
(
hookInput
)
{
...
...
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