Skip to content

ObjectPage" ObjectPageSection in IconTabBar Mode: current selectedSectionId is not taken into account while render #7215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
soriasayer opened this issue Apr 9, 2025 · 2 comments · Fixed by #7219
Labels

Comments

@soriasayer
Copy link

soriasayer commented Apr 9, 2025

Describe the bug

The ObjectPage component in mode="IconTabBar" fails to select the correct tab when selectedSectionId is updated. (e.g., via routing or state changes). The tab content updates correctly, but the UI does not reflect the active tab until manual interaction or page refresh.

  • Controlled change of selectedSectionId is not taken into account.
  • Despite the fact that the selectedSectionId has been changed, the ObjectPage does show the selected tab.

Isolated Example

No response

Reproduction steps

  1. Configure an ObjectPage with mode="IconTabBar" and multiple ObjectPageSection.
  2. Manually store the selectedSectionId in the React state
  3. Change the selectedSectionId interactively (by clicking on a button, etc)
  4. Observe that:
    • The content switches to the correct tab.
    • The tab header highlight does not update.

Expected Behaviour

When selectedSectionId changes, both the content and the tab header highlight should synchronize to reflect the active section.
In other words, a controlled way of changing tab should work.

Screenshots or Videos

In this screenshot, selecting the Change Tab 3 button fails to activate Tab 3, and the highlight is stuck on the Tab 1 header.

Image

UI5 Web Components for React Version

UI5 Web Components for React Version

UI5 Web Components Version

2.8.1

Browser

Chrome

Operating System

No response

Additional Context

No response

Relevant log output

Organization

SAP

Declaration

  • I’m not disclosing any internal or sensitive information.
@Lukas742
Copy link
Contributor

Lukas742 commented Apr 10, 2025

Hi @soriasayer

this sounds like a regression introduced in v2.8.1 which was fixed in v2.8.2.
Please update your dependencies and check the behavior again. In case it's still occurring even after updating, please add an isolated, reproducible example showing the issue, preferably by using this StackBlitz template.

Edit: Nevermind, I was able to reproduce the issue. We'll look into it asap.

@ui5-webcomponents-react-bot
Copy link
Contributor

🎉 This issue has been resolved in version v2.9.1 🎉

The release is available on v2.9.1

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🆕 New
Development

Successfully merging a pull request may close this issue.

3 participants