Skip to content

Commit cf901f4

Browse files
committed
Fix current location check for index page
Resolves #2805
1 parent 8680728 commit cf901f4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ title: Changelog
1414
- `@include` and `@includeCode` now work for comments on the entry point for projects with a single entry point, #2800.
1515
- Cascaded modifier tags will no longer be copied into type literals, #2802.
1616
- `@summary` now works to describe functions within modules, #2803.
17+
- Corrected navigation showing module link as current when not on module page, #2805.
1718

1819
## v0.27.3 (2024-12-04)
1920

src/lib/output/themes/default/partials/navigation.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ export function settings(context: DefaultThemeRenderContext) {
125125
export const navigation = function navigation(context: DefaultThemeRenderContext, props: PageEvent<Reflection>) {
126126
return (
127127
<nav class="tsd-navigation">
128-
<a href={context.urlTo(props.project)} class={classNames({ current: props.project === props.model })}>
128+
<a
129+
href={context.urlTo(props.project)}
130+
class={classNames({ current: props.url === props.model.url && props.model.isProject() })}
131+
>
129132
{getDisplayName(props.project)}
130133
</a>
131134
<ul class="tsd-small-nested-navigation" id="tsd-nav-container">

0 commit comments

Comments
 (0)