Skip to content

feat(ui5-side-navigation): fire item-toggle event on expand/collapse#13861

Open
LidiyaGeorgieva wants to merge 1 commit into
mainfrom
SideNavNewEvent
Open

feat(ui5-side-navigation): fire item-toggle event on expand/collapse#13861
LidiyaGeorgieva wants to merge 1 commit into
mainfrom
SideNavNewEvent

Conversation

@LidiyaGeorgieva

Copy link
Copy Markdown
Contributor

Add a cancelable "item-toggle" event that fires whenever a ui5-side-navigation-item or ui5-side-navigation-group is expanded or collapsed - via click, keyboard (arrows, +/-), or programmatic change to the "expanded" property.

The event detail exposes:

  • item: the toggled item
  • expanded: the new (requested) expanded state
  • programmatic: whether the change came from a property set (true) or user interaction (false)

Calling preventDefault() suppresses the toggle, leaving the expanded state unchanged (useful for lazy-loading child items before expand).

Fixes #13826

Add a cancelable "item-toggle" event that fires whenever a
ui5-side-navigation-item or ui5-side-navigation-group is expanded
or collapsed - via click, keyboard (arrows, +/-), or programmatic
change to the "expanded" property.

The event detail exposes:
- item: the toggled item
- expanded: the new (requested) expanded state
- programmatic: whether the change came from a property set (true)
  or user interaction (false)

Calling preventDefault() suppresses the toggle, leaving the expanded
state unchanged (useful for lazy-loading child items before expand).

Fixes #13826
@github-actions

Copy link
Copy Markdown

👋 Heads-up: dev close is in effect

Thanks for the contribution! This repository is currently in dev close ahead of release 2.25 (scheduled 2026-07-29, UTC). See the release schedule for the full timeline.

This PR appears to introduce public-API changes (detected by diffing the Custom Elements Manifest against the latest published version on npm):

@ui5/webcomponents-fiori

  • ➕ added event: item-toggle
  • 🔄 changed attribute expanded (type)
  • 🔄 changed attribute expanded (type)

Could you please hold off on merging into main until the release ships? Public-API changes are best landed in the next dev cycle so they don't slip into the release at the last minute. Once the release is out, this PR is good to go.

If this change must ship in the current release, please request a review from one or two members of @UI5/ui5-team-webc so the team can sign off explicitly.

💬 False positive? If you believe this PR doesn't actually change the public API (e.g. only internal refactoring, or an entry the detector mis-attributed), please reply on this thread — your feedback helps us improve the detection during this trial run.

Posted automatically by the Dev Close Notice workflow.

@sap-ui5-webcomponents-release

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request](ui5-side-navigation): fire event when group/item is expanded or collapsed

1 participant