Browse Source

Add search watcher to user management pages: reset pagination and fetch users on search input change

pull/2426/head
GONCALOUNI 6 months ago
parent
commit
ad3c05d0aa
3 changed files with 18 additions and 0 deletions
  1. 6
      frontend/pages/delete-user.vue
  2. 6
      frontend/pages/edit-user.vue
  3. 6
      frontend/pages/list-user.vue

6
frontend/pages/delete-user.vue

@ -350,6 +350,12 @@
return sortDesc[0] ? -comp : comp;
});
}
},
watch: {
search() {
this.options.page = 1;
this.fetchUsers();
}
}
}
</script>

6
frontend/pages/edit-user.vue

@ -421,6 +421,12 @@ export default {
return sortDesc[0] ? -comp : comp;
});
}
},
watch: {
search() {
this.options.page = 1;
this.fetchUsers();
}
}
}
</script>

6
frontend/pages/list-user.vue

@ -176,6 +176,12 @@ export default {
async created() {
await this.fetchUsers()
},
watch: {
search() {
this.options.page = 1;
this.fetchUsers();
}
},
methods: {
async fetchUsers() {
this.isLoading = true

Loading…
Cancel
Save