Skip to content

Commit

Permalink
perf: use replaceState to refresh url
Browse files Browse the repository at this point in the history
  • Loading branch information
StarHeartHunt committed Oct 30, 2023
1 parent 4b6d02d commit 8263d21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const searchKeyword = ref<string>(
const handleSearch = debounce((v: string) => {
const url = new URL(`${window.location.origin}/search`);
url.searchParams.append("q", v);
location.replace(url.href);
window.history.replaceState(null, null, url)

Check failure on line 22 in src/components/Table.vue

View workflow job for this annotation

GitHub Actions / deploy

Argument of type 'null' is not assignable to parameter of type 'string'.
}, 600);
</script>

Expand Down

0 comments on commit 8263d21

Please sign in to comment.