From 82cdca1034023f34b72c0ceb11645343b4c1f6b7 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Mon, 28 Jun 2021 23:26:03 +0200 Subject: [PATCH] Fixed: return to page 1 after searching --- resources/js/layouts/App.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/layouts/App.vue b/resources/js/layouts/App.vue index 8cd03114..916a4f85 100644 --- a/resources/js/layouts/App.vue +++ b/resources/js/layouts/App.vue @@ -48,8 +48,8 @@ export default { computed: { isearch: { set: debounce(function(v) { - this.$inertia.visit(this.qs({ search: v }), { - only: ['search', 'data'], + this.$inertia.visit(this.qs({ page: 1, search: v }), { + only: ['page', 'search', 'data'], preserveState: true, }); }, 500),