Skip to content

Conversation

noook
Copy link
Contributor

@noook noook commented Aug 1, 2025

πŸ”— Linked issue

Resolves: #4642

❓ 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

Property active for active breadcrumb was ignored.

Change && logical operator to ?? to better handle the behavior:

  • If active is set to false, item is not active
  • If active is set to true, item is active
  • If active is not defined, or null, the last item will be considered as active.

πŸ“ Checklist

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

@noook noook requested a review from benjamincanac as a code owner August 1, 2025 13:26
@benjamincanac
Copy link
Member

@noook I'm not sure this is correct, the active is always false here since it's injected from the ULink slot props πŸ€”

@benjamincanac benjamincanac marked this pull request as draft August 13, 2025 14:50
@noook
Copy link
Contributor Author

noook commented Aug 22, 2025

Sorry for the delay, and I see the issue.

I don't know how to properly fix this. The last item should only be considered active if none of the previous items was marked as active.

Maybe Breadcrumbs could benefit from a prop 'last-active?': boolean that checks for index === items!.length - 1 only if this prop is set to true (default true to prevent breaking changes) ?

<UBreadcrumps :last-active="false" ... /> In combination with active: true on a BreadcrumbItem, would achieve the desired output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 #1289
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breadcrumb: active property to force the current active item is ignored
2 participants