You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That triggers whenever the current URL path happens to contain the destination.
For example, if you add a new src/routes/aboutfoo.svelte that'll set "About" as active.
I did this, instead:
selected={isActive(path, item.to)}
function isActive(path, to) {
if (to == path) {
return true
}
if (path.startsWith(to+"/")) {
return true
}
return false
}
The second if marks an item selected if the current URL is below. Whether one wants that or not depends on whether the NavigationDrawer contains just one level, or multiple. Highlighting only the most exact matching entry gets a little tricky...
The text was updated successfully, but these errors were encountered:
smelte-sapper-template/src/routes/_layout.svelte
Lines 80 to 81 in 780ab5b
That triggers whenever the current URL path happens to contain the destination.
For example, if you add a new
src/routes/aboutfoo.svelte
that'll set "About" as active.I did this, instead:
The second if marks an item selected if the current URL is below. Whether one wants that or not depends on whether the NavigationDrawer contains just one level, or multiple. Highlighting only the most exact matching entry gets a little tricky...
The text was updated successfully, but these errors were encountered: