Skip to content

Tabs href attribute doesn't workΒ #2165

@mchoo7

Description

@mchoo7
<Tabs selected={menuList.findIndex((item) => current === item.name.toLowerCase()) || 0}>
	{#each menuList as item (item.name)}
		<Tab href={item.path} disabled={item.disabled}>
			{@const Component = item.icon}
			<div class="flex items-center gap-2">
				<Component />
				<span class="tab-label">{item.name}</span>
			</div>
		</Tab>
	{/each}

	<svelte:fragment slot="content">
		{#each menuList as item (item.name)}
			<TabContent>
				{@render children()}
			</TabContent>
		{/each}
	</svelte:fragment>
</Tabs>

When clicking a tab, users is supposed to be led to a new page specified in href attribute, but it does not trigger any page switch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions