Skip to content
Snippets Groups Projects
Commit 6c395713 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Added debounce on search user input

parent d0d000e1
No related branches found
No related tags found
No related merge requests found
...@@ -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>
......
...@@ -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;
......
...@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment