-
-
Notifications
You must be signed in to change notification settings - Fork 413
Open
Labels
scope: toolpad-coreAbbreviated to "core"Abbreviated to "core"type: bugIt doesn't behave as expected.It doesn't behave as expected.
Description
I attempted to use a link that included search params in the global navigation for toolpad, but it was slicing of the search params.
/jobs?page=2 --> /jobs
Here is the diff that solved my problem:
diff --git a/node_modules/@toolpad/core/shared/Link.js b/node_modules/@toolpad/core/shared/Link.js
index cfe8842..a50dba5 100644
--- a/node_modules/@toolpad/core/shared/Link.js
+++ b/node_modules/@toolpad/core/shared/Link.js
@@ -21,7 +21,7 @@ export const Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {
return event => {
event.preventDefault();
const url = new URL(event.currentTarget.href);
- routerContext.navigate(url.pathname, {
+ routerContext.navigate(url.pathname + url.search, {
history
});
onClick?.(event);
Search keywords:
jayenashar and venmartin
Metadata
Metadata
Assignees
Labels
scope: toolpad-coreAbbreviated to "core"Abbreviated to "core"type: bugIt doesn't behave as expected.It doesn't behave as expected.