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
A fix for this would be to manually set the "tabid" prop for each "Tab" component, then in the "Tabs" component which wraps the "Tab" components you "bind:progVar" where progVar is your programmatic variable which can then be used in your svelte scripts. I set up the logic to connect a url router to the tabs in a navbar like so:
<script>
let progVar = "/";
$: progVar = location.pathname
// Whenever the url in the browser changes this value will change, dynamically updating progVar
</script>
<Nav>
<svelte:fragment slot="left">
<Tabs bind:progVar>
<Tab on:click={() => location.pathname = "/a"} tabid="/a">A</Tab>
<Tab on:click={() => location.pathname = "/b"} tabid="/b">B</Tab>
<Tab on:click={() => location.pathname = "/c"} tabid="/c">C</Tab>
</Tabs>
</svelte:fragment>
</Nav>
I am changing the bind:active value with a button, but the tab doesn't become active.
The text was updated successfully, but these errors were encountered: