From 094537c935a9e52e2d2818ba519b8a19c093e4be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Thu, 1 Jun 2023 11:11:38 +0300 Subject: [PATCH] fix tab pagination issue --- resources/assets/js/mixins/global.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/resources/assets/js/mixins/global.js b/resources/assets/js/mixins/global.js index 37721aeb350..d2d111dbe9c 100644 --- a/resources/assets/js/mixins/global.js +++ b/resources/assets/js/mixins/global.js @@ -469,6 +469,9 @@ export default { onChangePaginationLimit(event) { let path = ''; + let split_href = window.location.href.split('#'); + let href = split_href[0]; + if (window.location.search.length) { if (window.location.search.includes('limit')) { let queries = []; @@ -496,10 +499,14 @@ export default { }); } else { - path = window.location.href + '&limit=' + event.target.getAttribute("value"); + path = href + '&limit=' + event.target.getAttribute("value"); } } else { - path = window.location.href + '?limit=' + event.target.getAttribute("value"); + path = href + '?limit=' + event.target.getAttribute("value"); + } + + if (split_href[1]) { + path += '#' + split_href[1]; } window.location.href = path;