-
Notifications
You must be signed in to change notification settings - Fork 988
Closed
Labels
Description
Description
Breadcrumb uses Link (and LinkBase) to implement the item rendering and navigation. Link (through LinkBase) in itself supports onClick event/prop. Now, passing onClick to the breadcrumb item does not go all the way through to the LinkBase, and thus prevents the fine-grained control of the Breadcrumb component.
The usage would look something like this:
<template>
<UBreadcrumb :items="items" />
</template>
<script setup>
const items = [
{ label: "click for one", onClick: () => alert("1"), to: "/one" },
{ label: "click for two", onClick: () => alert("2"), to: "/two" },
]
</script>
My need is to have some secondary effects happening besides the navigation when the user clicks on a breadcrumb item.
Additional context
No response