@tanstack/router-core 1.121.39 → 1.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.d.cts +1 -1
- package/dist/cjs/route.cjs.map +1 -1
- package/dist/cjs/route.d.cts +6 -1
- package/dist/cjs/router.cjs +4 -2
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/route.d.ts +6 -1
- package/dist/esm/route.js.map +1 -1
- package/dist/esm/router.js +4 -2
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/route.ts +9 -1
- package/src/router.ts +9 -2
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/route.ts
CHANGED
|
@@ -1205,6 +1205,13 @@ export interface LoaderFnContext<
|
|
|
1205
1205
|
route: AnyRoute
|
|
1206
1206
|
}
|
|
1207
1207
|
|
|
1208
|
+
export interface DefaultRootRouteOptionsExtensions {
|
|
1209
|
+
shellComponent?: unknown
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
export interface RootRouteOptionsExtensions
|
|
1213
|
+
extends DefaultRootRouteOptionsExtensions {}
|
|
1214
|
+
|
|
1208
1215
|
export type RootRouteOptions<
|
|
1209
1216
|
TSearchValidator = undefined,
|
|
1210
1217
|
TRouterContext = {},
|
|
@@ -1234,7 +1241,8 @@ export type RootRouteOptions<
|
|
|
1234
1241
|
| 'parseParams'
|
|
1235
1242
|
| 'stringifyParams'
|
|
1236
1243
|
| 'params'
|
|
1237
|
-
>
|
|
1244
|
+
> &
|
|
1245
|
+
RootRouteOptionsExtensions
|
|
1238
1246
|
|
|
1239
1247
|
export type RouteConstraints = {
|
|
1240
1248
|
TParentRoute: AnyRoute
|
package/src/router.ts
CHANGED
|
@@ -1790,8 +1790,15 @@ export class RouterCore<
|
|
|
1790
1790
|
location: this.latestLocation,
|
|
1791
1791
|
pendingMatches,
|
|
1792
1792
|
// If a cached moved to pendingMatches, remove it from cachedMatches
|
|
1793
|
-
cachedMatches: s.cachedMatches.filter((
|
|
1794
|
-
|
|
1793
|
+
cachedMatches: s.cachedMatches.filter((cachedMatch) => {
|
|
1794
|
+
const pendingMatch = pendingMatches.find((e) => e.id === cachedMatch.id)
|
|
1795
|
+
|
|
1796
|
+
if (!pendingMatch) return true
|
|
1797
|
+
|
|
1798
|
+
return (
|
|
1799
|
+
cachedMatch.status === 'success' &&
|
|
1800
|
+
(cachedMatch.isFetching || cachedMatch.loaderData !== undefined)
|
|
1801
|
+
)
|
|
1795
1802
|
}),
|
|
1796
1803
|
}))
|
|
1797
1804
|
}
|