Commit 6c395713 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Added debounce on search user input

parent d0d000e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ export default {
    }
  },
  created: function() {
    this.filterGroups = debounce(this.filterGroups, 500)
    this.filterGroups = debounce(this.filterGroups, 500);
  }
}
</script>
+1 −1
Original line number Diff line number Diff line
@@ -33,11 +33,11 @@ export default {
  methods: {
    resetModal: function() {
      this.newGroupName = null;
      this.leaf = true;
      this.resetError();
    },
    afterShow: function() {
      this.$refs.newGroupNameInput.focus();
      this.leaf = true;
    },
    resetError: function() {
      this.newGroupNameError = null;
+4 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

<script>
import client from 'api-client';
import debounce from 'debounce'; // for delaying the input event (search filter)

export default {
  name: 'SearchUser',
@@ -35,6 +36,9 @@ export default {
      permission: 'VIEW_MEMBERS'
    }
  },
  created() {
    this.searchUser = debounce(this.searchUser, 500)
  },
  methods: {
    searchUser: function() {
      client.searchUser(this.searchInput)