Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IA2
GMS
Commits
6c395713
Commit
6c395713
authored
Sep 11, 2020
by
Sonia Zorba
Browse files
Added debounce on search user input
parent
d0d000e1
Changes
3
Show whitespace changes
Inline
Side-by-side
gms-ui/src/components/GroupsPanel.vue
View file @
6c395713
...
@@ -71,7 +71,7 @@ export default {
...
@@ -71,7 +71,7 @@ export default {
}
}
},
},
created
:
function
()
{
created
:
function
()
{
this
.
filterGroups
=
debounce
(
this
.
filterGroups
,
500
)
this
.
filterGroups
=
debounce
(
this
.
filterGroups
,
500
)
;
}
}
}
}
</
script
>
</
script
>
...
...
gms-ui/src/components/modals/AddGroupModal.vue
View file @
6c395713
...
@@ -33,11 +33,11 @@ export default {
...
@@ -33,11 +33,11 @@ export default {
methods
:
{
methods
:
{
resetModal
:
function
()
{
resetModal
:
function
()
{
this
.
newGroupName
=
null
;
this
.
newGroupName
=
null
;
this
.
leaf
=
true
;
this
.
resetError
();
this
.
resetError
();
},
},
afterShow
:
function
()
{
afterShow
:
function
()
{
this
.
$refs
.
newGroupNameInput
.
focus
();
this
.
$refs
.
newGroupNameInput
.
focus
();
this
.
leaf
=
true
;
},
},
resetError
:
function
()
{
resetError
:
function
()
{
this
.
newGroupNameError
=
null
;
this
.
newGroupNameError
=
null
;
...
...
gms-ui/src/components/modals/SearchUser.vue
View file @
6c395713
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
<
script
>
<
script
>
import
client
from
'
api-client
'
;
import
client
from
'
api-client
'
;
import
debounce
from
'
debounce
'
;
// for delaying the input event (search filter)
export
default
{
export
default
{
name
:
'
SearchUser
'
,
name
:
'
SearchUser
'
,
...
@@ -35,6 +36,9 @@ export default {
...
@@ -35,6 +36,9 @@ export default {
permission
:
'
VIEW_MEMBERS
'
permission
:
'
VIEW_MEMBERS
'
}
}
},
},
created
()
{
this
.
searchUser
=
debounce
(
this
.
searchUser
,
500
)
},
methods
:
{
methods
:
{
searchUser
:
function
()
{
searchUser
:
function
()
{
client
.
searchUser
(
this
.
searchInput
)
client
.
searchUser
(
this
.
searchInput
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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