Skip to content

Conversation

@tmlmt
Copy link

@tmlmt tmlmt commented Nov 29, 2025

🔗 Linked issued

Resolves #5513

🙏 Help requested

The fix works as expected in the playground (pnpm run dev) but I can't make the tests to work. For some reason, passing the route to mountSuspended is not enough for the test to simulate how Breadcrumb/Link perceives the current route when mounted in the environment. Could you help me into the right direction?

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (**updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Currently, if the active prop is not set for all breadcrumb items (-> item.active), then (index === items!.length - 1) is used to determine whether the item should be shown as active. It is therefore always the last item of the breadcrumb which is shown as active.

This PR solves this by making use of the active slot prop of the Link component to show the current route as active.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Breadcrumb always shows last item as active regardless of route

1 participant