@tanstack/react-router
Advanced tools
Comparing version 1.64.2 to 1.64.3
@@ -153,4 +153,4 @@ "use client"; | ||
}); | ||
router.commitLocation({ | ||
...next, | ||
router.buildAndCommitLocation({ | ||
...options, | ||
replace, | ||
@@ -157,0 +157,0 @@ resetScroll, |
@@ -329,3 +329,15 @@ import { createMemoryHistory, createBrowserHistory, parseHref } from "@tanstack/history"; | ||
const postFilteredSearch = postSearchFilters.length ? postSearchFilters.reduce((prev, next) => next(prev), destSearch) : destSearch; | ||
const search = replaceEqualDeep(fromSearch, postFilteredSearch); | ||
let search = postFilteredSearch; | ||
if (opts._includeValidateSearch) { | ||
matchedRoutesResult == null ? void 0 : matchedRoutesResult.matchedRoutes.forEach((route) => { | ||
try { | ||
if (route.options.validateSearch) { | ||
const validator = typeof route.options.validateSearch === "object" ? route.options.validateSearch.parse : route.options.validateSearch; | ||
search = { ...search, ...validator(search) }; | ||
} | ||
} catch (e) { | ||
} | ||
}); | ||
} | ||
search = replaceEqualDeep(fromSearch, search); | ||
const searchStr = this.options.stringifySearch(search); | ||
@@ -460,3 +472,6 @@ const hash = dest.hash === true ? this.latestLocation.hash : dest.hash ? functionalUpdate(dest.hash, this.latestLocation.hash) : void 0; | ||
} | ||
const location = this.buildLocation(rest); | ||
const location = this.buildLocation({ | ||
...rest, | ||
_includeValidateSearch: true | ||
}); | ||
return this.commitLocation({ | ||
@@ -463,0 +478,0 @@ ...location, |
@@ -25,2 +25,3 @@ import { NavigateOptions, ToOptions } from './link.js'; | ||
leaveParams?: boolean; | ||
_includeValidateSearch?: boolean; | ||
}) => ParsedLocation; | ||
@@ -27,0 +28,0 @@ export type InjectedHtmlEntry = string | (() => Promise<string> | string); |
{ | ||
"name": "@tanstack/react-router", | ||
"version": "1.64.2", | ||
"version": "1.64.3", | ||
"description": "Modern and scalable routing for React applications", | ||
@@ -5,0 +5,0 @@ "author": "Tanner Linsley", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1535814
19291