Use replaceState instead of pushState for forms and infolists tab updates.

This change updates tab behavior to replace the current URL instead of adding a new entry to the browser history. It prevents creating unnecessary history entries, resulting in a smoother user experience when switching tabs.
This commit is contained in:
Iliyas M
2025-02-27 22:59:36 +05:30
parent 9b1cfa52c6
commit e1d68e2a8d
2 changed files with 2 additions and 2 deletions
@@ -26,7 +26,7 @@
const url = new URL(window.location.href)
url.searchParams.set(@js($getTabQueryStringKey()), this.tab)
history.pushState(null, document.title, url.toString())
history.replaceState(null, document.title, url.toString())
},
}"
x-init="
@@ -25,7 +25,7 @@
const url = new URL(window.location.href)
url.searchParams.set(@js($getTabQueryStringKey()), this.tab)
history.pushState(null, document.title, url.toString())
history.replaceState(null, document.title, url.toString())
},
}"
x-init="