We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems that class active does not append to next clicked menu item on SPA apps. It's only updated during browser refresh.
active
It seems that Navigate component's active class condition is not reactive: https://github.com/jorgegorka/svelte-router/blob/master/src/components/navigate.svelte#L27
Navigate
The text was updated successfully, but these errors were encountered:
If you can tweak your app structure a bit, I've had success with simply reusing the currentRoute prop:
class:active={currentRoute?.name === '/my/page'}
Sorry, something went wrong.
Another option, e.g. a URL structure like: /view/:view/status/:status
/view/:view/status/:status
let status $: status = currentRoute?.childRoute?.namedParams?.status //... class:active={status === 'string-to-match'}
No branches or pull requests
It seems that class
active
does not append to next clicked menu item on SPA apps.It's only updated during browser refresh.
It seems that
Navigate
component'sactive
class condition is not reactive:https://github.com/jorgegorka/svelte-router/blob/master/src/components/navigate.svelte#L27
The text was updated successfully, but these errors were encountered: