@jsenv/navi 0.15.8 → 0.15.9
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/jsenv_navi.js +9 -2
- package/dist/jsenv_navi.js.map +5 -5
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -17324,12 +17324,19 @@ const RouteLink = ({
|
|
|
17324
17324
|
}
|
|
17325
17325
|
const routeStatus = useRouteStatus(route);
|
|
17326
17326
|
const url = route.buildUrl(routeParams);
|
|
17327
|
-
|
|
17327
|
+
let isCurrent;
|
|
17328
|
+
if (routeStatus.exactMatching) {
|
|
17329
|
+
isCurrent = true;
|
|
17330
|
+
} else if (routeStatus.matching) {
|
|
17331
|
+
isCurrent = route.matchesParams(routeParams);
|
|
17332
|
+
} else {
|
|
17333
|
+
isCurrent = false;
|
|
17334
|
+
}
|
|
17328
17335
|
return jsx(Link, {
|
|
17329
17336
|
...rest,
|
|
17330
17337
|
href: url,
|
|
17331
17338
|
pseudoState: {
|
|
17332
|
-
":-navi-href-current":
|
|
17339
|
+
":-navi-href-current": isCurrent
|
|
17333
17340
|
},
|
|
17334
17341
|
children: children || route.buildRelativeUrl(routeParams)
|
|
17335
17342
|
});
|