Skip to content

Commit

Permalink
fix scrolling issue on audit page
Browse files Browse the repository at this point in the history
  • Loading branch information
hissalht committed Dec 1, 2023
1 parent 999b90c commit 39dfcf1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion confiture-web-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"slugify": "^1.6.5",
"vue": "^3.2.45",
"vue-matomo": "^4.2.0",
"vue-router": "^4.1.6"
"vue-router": "^4.2.5"
},
"devDependencies": {
"@sentry/vite-plugin": "^0.3.0",
Expand Down
9 changes: 7 additions & 2 deletions confiture-web-app/src/composables/useWrappedFetch.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { onMounted, watch } from "vue";
import { onBeforeRouteLeave, useRoute, useRouter } from "vue-router";
import { TimeoutError } from "ky";
import { isEqual } from "lodash-es";

import { captureWithPayloads } from "../utils";

Expand Down Expand Up @@ -51,8 +52,12 @@ export function useWrappedFetch(
if (watchParams) {
const watchStopHandle = watch(
() => route.params,
() => {
func().catch(handleError);
(newParams, oldParams) => {
// Make sure the params actually changed because if only the hash of the route
// changed, the `params` objects will be equal but different references, which will trigger the watcher
if (!isEqual(newParams, oldParams)) {
func().catch(handleError);
}
}
);

Expand Down
15 changes: 10 additions & 5 deletions confiture-web-app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,11 @@
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.4.5.tgz#d54e844c1adbb1e677c81c665ecef1a2b4bb8380"
integrity sha512-JD5fcdIuFxU4fQyXUu3w2KpAJHzTVdN+p4iOX2lMWSHMOoQdMAcpFLZzm9Z/2nmsoZ1a96QEhZ26e50xLBsgOQ==

"@vue/devtools-api@^6.5.0":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.5.1.tgz#7f71f31e40973eeee65b9a64382b13593fdbd697"
integrity sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==

"@vue/[email protected]":
version "3.2.45"
resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.2.45.tgz#07ac83b8138550c83dfb50db43cde1e0e5e8124d"
Expand Down Expand Up @@ -1788,12 +1793,12 @@ vue-matomo@^4.2.0:
resolved "https://registry.yarnpkg.com/vue-matomo/-/vue-matomo-4.2.0.tgz#d65e369e4ead1d95ef790bef3627512cac3d25e9"
integrity sha512-m5hCw7LH3wPDcERaF4sp/ojR9sEx7Rl8TpOyH/4jjQxMF2DuY/q5pO+i9o5Dx+BXLSa9+IQ0qhAbWYRyESQXmA==

vue-router@^4.1.6:
version "4.1.6"
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.1.6.tgz#b70303737e12b4814578d21d68d21618469375a1"
integrity sha512-DYWYwsG6xNPmLq/FmZn8Ip+qrhFEzA14EI12MsMgVxvHFDYvlr4NXpVF5hrRH1wVcDP8fGi5F4rxuJSl8/r+EQ==
vue-router@^4.2.5:
version "4.2.5"
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.2.5.tgz#b9e3e08f1bd9ea363fdd173032620bc50cf0e98a"
integrity sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==
dependencies:
"@vue/devtools-api" "^6.4.5"
"@vue/devtools-api" "^6.5.0"

vue-template-compiler@^2.7.14:
version "2.7.14"
Expand Down

0 comments on commit 39dfcf1

Please sign in to comment.