Skip to content

Commit c64bcd3

Browse files
narsaynorathandrewshie-sentry
authored andcommitted
feat(ui): Use pathname as the ScrollRestoration key (#91780)
Prevents URL changes such as query params from changing the scroll unexpectedly on the same path.
1 parent 37a3bbd commit c64bcd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

static/app/views/organizationLayout/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function OrganizationLayout({children}: Props) {
6464
<App organization={organization}>{children}</App>
6565
</GlobalDrawer>
6666
</OrganizationContainer>
67-
<ScrollRestoration />
67+
<ScrollRestoration getKey={location => location.pathname} />
6868
</SentryDocumentTitle>
6969
);
7070
}

0 commit comments

Comments
 (0)