Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

FIx: Dispatch hashChange event manually (#7129)

SamarJyoti4968654d5e05a15
diff --git a/frontend/src/components/ui/query-param-preserving-link.tsx b/frontend/src/components/ui/query-param-preserving-link.tsx
index 9336bba33e..ca44801333 100644
--- a/frontend/src/components/ui/query-param-preserving-link.tsx
+++ b/frontend/src/components/ui/query-param-preserving-link.tsx
@@ -20,6 +20,9 @@ export const QueryParamPreservingLink: React.FC<
currentUrl.hash = href;
globalThis.history.pushState({}, "", currentUrl.toString());
+ //manually dispatch hashchange event
+ globalThis.dispatchEvent(new HashChangeEvent("hashchange"));
+
// Scroll to the anchor
const targetId = href.slice(1);
const targetElement = document.getElementById(targetId);