Remember selected date range when switching between Insights pages (#4886)

This commit is contained in:
Kamil Kisiela 2024-06-05 15:47:39 +02:00 committed by GitHub
parent b42855a008
commit 24d0e76133
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 0 deletions

View file

@ -566,6 +566,14 @@ function ClientsStats(props: {
targetId: props.targetId,
name: ev.value,
},
search(searchParams) {
if ('from' in searchParams && 'to' in searchParams) {
return {
from: searchParams.from,
to: searchParams.to,
};
}
},
});
}
},

View file

@ -280,6 +280,14 @@ function ClientView(props: {
operationName: operation.name,
operationHash: operation.operationHash ?? '_',
}}
search={searchParams => {
if ('from' in searchParams && 'to' in searchParams) {
return {
from: searchParams.from,
to: searchParams.to,
};
}
}}
>
{operation.name}
</Link>