Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix(nc-gui): navigation issue

Ramesh Manecf8a6c313691
diff --git a/packages/nc-gui/utils/browserUtils.ts b/packages/nc-gui/utils/browserUtils.ts
index c244cba0e9..33f0ea8203 100644
--- a/packages/nc-gui/utils/browserUtils.ts
+++ b/packages/nc-gui/utils/browserUtils.ts
@@ -188,3 +188,13 @@ export const estimateTagWidth = ({
return totalWidth
}
+
+/**
+ * Remove query params from the URL
+ * @param keysToRemove - The keys to remove from the URL
+ */
+export const removeQueryParamsFromURL = (keysToRemove: string[]) => {
+ const url = new URL(window.location.href)
+ keysToRemove.forEach((key) => url.searchParams.delete(key))
+ window.history.replaceState({}, '', url.toString())
+}