Preserve URL hash when redirecting in grid "reset to defaults"

This commit is contained in:
Lance Edgar 2023-08-30 23:51:18 -05:00
parent 625982d639
commit 62aa0c5965
2 changed files with 20 additions and 3 deletions

View file

@ -542,7 +542,16 @@
resetView() {
this.loading = true
location.href = '?reset-to-default-filters=true'
// use current url proper, plus reset param
let url = '?reset-to-default-filters=true'
// add current hash, to preserve that in redirect
if (location.hash) {
url += '&hash=' + location.hash.slice(1)
}
location.href = url
},
addFilter(filter_key) {