fix(web): keep url query parameters when swapping people (#5468)
This commit is contained in:
parent
1dc832d392
commit
2195730fa6
1 changed files with 3 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
||||||
import { cloneDeep } from 'lodash-es';
|
import { cloneDeep } from 'lodash-es';
|
||||||
import LoadingSpinner from '../shared-components/loading-spinner.svelte';
|
import LoadingSpinner from '../shared-components/loading-spinner.svelte';
|
||||||
import { searchNameLocal } from '$lib/utils/person';
|
import { searchNameLocal } from '$lib/utils/person';
|
||||||
|
import { page } from '$app/stores';
|
||||||
|
|
||||||
export let person: PersonResponseDto;
|
export let person: PersonResponseDto;
|
||||||
let people: PersonResponseDto[] = [];
|
let people: PersonResponseDto[] = [];
|
||||||
|
@ -78,7 +79,8 @@
|
||||||
|
|
||||||
const handleSwapPeople = () => {
|
const handleSwapPeople = () => {
|
||||||
[person, selectedPeople[0]] = [selectedPeople[0], person];
|
[person, selectedPeople[0]] = [selectedPeople[0], person];
|
||||||
goto(`${AppRoute.PEOPLE}/${person.id}?action=merge`);
|
$page.url.searchParams.set('action', 'merge');
|
||||||
|
goto(`${AppRoute.PEOPLE}/${person.id}?${$page.url.searchParams.toString()}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSelect = (selected: PersonResponseDto) => {
|
const onSelect = (selected: PersonResponseDto) => {
|
||||||
|
|
Loading…
Reference in a new issue