mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
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:
@@ -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="
|
||||
|
||||
Reference in New Issue
Block a user